问题
Possible Duplicate:
How can you force VB6 to use the DLLs and OCXs from the app directory?
I have a small application and it references a DLL named chkConn.dll
.
For example, I have two different versions of the dll in two different locations. The other one is C:\chkConn.dll
and the other is D:\chkConn.dll
. I want my application to use C:\chkConn.dll
even if I register D:\chkConn.dll
in my system.
I read about creating manifests,but, I'm not sure how to do it.
回答1:
The easiest thing is to put the dll(s) you want to use into your application folder. Then create an empty text file ApplicationName.exe.local. The .local extension tells Windows to load dlls for the exe from that folder first. The interesting thing is the trick works for ActiveX DLLs also.
来源:https://stackoverflow.com/questions/8505784/how-to-force-a-vb6-program-to-use-a-dll-in-a-specified-folder