N
Nicolas
Hi all,
Here is a problem about loading a DLL many times using MSVC6:
I have to explicitely load two different flavors of the same libraries
implementing the same interface.
As long as they are not located in the same absolute path, this is ok.
The tricky part comes when these libraries are implicitely linked with other
libraries.
Let's put a few names as examples:
My two libraries explicitely loaded are respectively called A.dll and B.dll
respectively located in A_dir and B_dir directories.
A.dll and B.dll implement the same interface.
Let say these libraries are implicitely linked against X.dll.
So, when A.dll is loaded, X.dll will also be implicitely loaded. Now B.dll
is loaded, but as X.dll has already been loaded, it won't be again.
As far as I can understand the way Microsoft compiler is working, this looks
ok to me.
However, it is requested to me that X.dll must be loaded as many times as
A.dll and B.dll are loaded. By this I mean that the X.dll memory space
should be replicated as many times as A.dll and B.dll are loaded.
This might be achieved by copying X.dll in A_dir and B_dir directories to
give it a different path. The problem is now to force A.dll and B.dll to
implicitely load X.dll in their respective directory.
Then, my problem is how to force an implicit link to use a specific DLL ???
Using a few compiler/linker options, I made it work for Linux. Now it's time
to do it for Windows...
I really would like to thank in advance whoever will help me to solve this.
Thanks in advance,
Nicolas
Here is a problem about loading a DLL many times using MSVC6:
I have to explicitely load two different flavors of the same libraries
implementing the same interface.
As long as they are not located in the same absolute path, this is ok.
The tricky part comes when these libraries are implicitely linked with other
libraries.
Let's put a few names as examples:
My two libraries explicitely loaded are respectively called A.dll and B.dll
respectively located in A_dir and B_dir directories.
A.dll and B.dll implement the same interface.
Let say these libraries are implicitely linked against X.dll.
So, when A.dll is loaded, X.dll will also be implicitely loaded. Now B.dll
is loaded, but as X.dll has already been loaded, it won't be again.
As far as I can understand the way Microsoft compiler is working, this looks
ok to me.
However, it is requested to me that X.dll must be loaded as many times as
A.dll and B.dll are loaded. By this I mean that the X.dll memory space
should be replicated as many times as A.dll and B.dll are loaded.
This might be achieved by copying X.dll in A_dir and B_dir directories to
give it a different path. The problem is now to force A.dll and B.dll to
implicitely load X.dll in their respective directory.
Then, my problem is how to force an implicit link to use a specific DLL ???
Using a few compiler/linker options, I made it work for Linux. Now it's time
to do it for Windows...
I really would like to thank in advance whoever will help me to solve this.
Thanks in advance,
Nicolas