Hi,
Firstly, you cannot have two files having the same name (probably only with
differences in character case) in the same folder (may be NTFS allows this
but FAT32 definitely not). Therefore, you will have to store these DLLs in
separate folders.
Secondly, while managed DLLs CAN be loaded with LoadLibrary, there is little
sense in doing so. The simplest way to expose a managed library to unmanaged
code is by making the managed library COM-visible.
Hence, the .NET Interop subsystem will take care of the DLL location - your
only responsibility would be to register the managed DLL with the
appropriate tool (regasm.exe). Provided it is stored in a separate folder,
this will ensure the framework will be able to successfully locate and load
the managed DLL.
Does this answer your question?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
kinghuangz said:
Everyone:
I want to use a DLL(FileName

ubFunction.Dll) built with VS.Net(C#)
in
a
unmanaged Program .But there was a Dll just has the same filename,it was
built with VC++(6.0).The unmanaged was loaded by LoadLibrary function
firstly,and it would be free until the Program's end.How can I Load the
managed Dll?