I am talking about win32 dll, these simple pe files. I am confused after I run the test, compared to what I saw in the process explorer.exe.
I wrote a test with the following modules: (C ++)
DLLLoader.exe refers to A.dll in the same folder.
B.dll refers to A.dll (2) in another folder. (A.dll (2) is a completely different DLL from A.dll, but with the same name)
DLLLoader.exe will load B.dll explicitly through :: LoadLibrary.
Now I run DllLoader.exe, firstly, A.dll will be loaded, but then when it tries to load B.dll, it just does not work: I suspect that this is because B.dll considers A.dll already loaded in the process, but in fact, the one loaded is not the one required by B.dll, the import / export table cannot match, therefore B.dll does not load.
This apparently tells us that we cannot load 2 DLLs with the same name in the same process, even if they have a different path.
But when I used the process handler to monitor the loaded modules during Windows explorer.exe, I could see how 2 DLLs with the same name are loaded:
comctl32.dll User Control Panel C: \ WINDOWS \ WinSxS ... \ comctl32.dll
comctl32.dll Common Controls Library C: \ WINDOWS \ system32 \ comctl32.dll
Can any of you shed light on this?
process dll
Baiyan huang
source share