How to force a VB6 program to use a dll in a specified folder? [duplicate]

こ雲淡風輕ζ 提交于 2019-12-08 03:15:03

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!