在Windows上安装共享DLL的位置 [英] Where to install shared DLLs on Windows

查看:231
本文介绍了在Windows上安装共享DLL的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以在Windows(XP / Vista / 7)上安装的驱动程序。它通过第三方应用程序链接到的本机C ++ DLL访问,哪个也是Winsock提供程序(WSP)。它曾经被安装在System32下,但是看到没有建议,我改为安装在ProgramFiles下。



现在,问题是人们不得不要么将它复制回到System32或将其复制到应用程序目录中,只要他们想在自己的应用程序中使用它,因为当应用程序尝试加载DLL时,Windows将不会在ProgramFiles下搜索安装目录。



我没有找到任何Microsoft文档讨论此问题,所以如果不应该使用System32,那么应该在哪里安装共享的DLL?

解决方案

由于它是一个链接到您的驱动程序的DLL,可能不是一个问题,但我会警惕尝试共享DLL,而是尝试让所有客户端的开发人员应用程序将自己的版本的DLL保留在其应用程序文件夹中。
我在DLL Hell中有太多的乐趣,想要更多的奇怪的bug,因为AppX用破坏AppY等的旧版本覆盖了DLL。


I have a driver which can be installed on Windows (XP/Vista/7). It's accessed via a native C++ DLL that 3rd-party applications link to, and which is also a Winsock Provider (WSP). It used to be installed under System32, but having seen advice not to, I changed it to install under ProgramFiles instead.

Now, the problem is that people are having to either copy it back into System32 or copy it into the application directory whenever they want to use it in their own applications, because Windows won't search the install directory under ProgramFiles when the application tries to load the DLL.

I've been unable to find any Microsoft documentation discussing this issue, so if System32 shouldn't be used then where should shared DLLs be installed?

解决方案

Since it's a DLL linked to your driver maybe it's less of an issue, but I'd be wary of trying to share the DLL and would instead try to get all developers of client apps to keep their own version of the dll in their applications folders. I've had too much fun in DLL Hell to want any more weird bugs because AppX overwrote the DLL with an old version that breaks AppY etc.

这篇关于在Windows上安装共享DLL的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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