如何强制VB6程序在指定文件夹中使用dll? [英] How to force a VB6 program to use a dll in a specified folder?

查看:214
本文介绍了如何强制VB6程序在指定文件夹中使用dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
如何您强迫VB6使用app目录中的DLL和OCX?

Possible Duplicate:
How can you force VB6 to use the DLLs and OCXs from the app directory?

我有一个小应用程序,它引用了一个名为chkConn.dll的DLL.

I have a small application and it references a DLL named chkConn.dll.

例如,我在两个不同的位置有两个不同版本的dll.另一个是C:\chkConn.dll,另一个是D:\chkConn.dll.即使我在系统中注册了D:\chkConn.dll,我也希望我的应用程序使用C:\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.

推荐答案

最简单的方法是将要使用的dll放入应用程序文件夹.然后创建一个空的文本文件 ApplicationName .exe.local. .local 扩展名告诉Windows首先从该文件夹加载exe的dll.有趣的是,该技巧也适用于ActiveX DLL.

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.

这篇关于如何强制VB6程序在指定文件夹中使用dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆