点本地文件来处理 DLL Hell 问题吗?
我读过,在应用程序目录中放置一个名为
的空文件将导致应用程序首先在该目录中查找 DLL
和 < code>OCXs 以避免系统其他地方发现的 DLL
和 OCXs
发生冲突的问题。
但是应用程序不是首先会在应用程序目录中查找吗? .local
文件实际上有什么作用?
I've read that placing an empty file named <AppName>.exe.local
in the application directory will cause the application to look in that directory first for DLLs
and OCXs
so as to avoid issues with conflicting DLLs
and OCXs
found elsewhere on the system.
But doesn't the application first look in the application directory anyway? What effect does the .local
file actually have?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
坦白说,我以前从未听说过
.local
方案,但快速搜索后发现了 这篇文章 很好地解释了这一点:看来
.local
文件甚至会首先强制对应用程序目录进行绝对路径搜索,而通常绝对路径不会更改,只有相对路径遵循 DLL 搜索顺序。To be frank, I've never heard of the
.local
scheme before, but a quick search brought up this article which quite explains it:It appears that the
.local
file forces even absolute-path searches to the application directory first, whereas usually absolute paths are unchanged and only relative paths follow the DLL search order.参考:动态链接库重定向
Ref.: Dynamic-Link Library Redirection