如何为我的应用程序的 DLL 创建一个单独的文件夹?

2022-01-12 00:00:00 visual-studio dll visual-c++ c++ mfc

我已经成功地将一个大型 MFC 项目划分为几个较小的 DLL 项目.现在我想在我的应用程序文件夹中有一个名为DLL"的单独文件夹,其中放置了子项目中的所有 DLL.

I have successfully divided a large MFC project into a couple of smaller DLL projects. Now I want to have a separate folder called "DLL" in my application's folder, where all the all the DLLs from the subprojects are placed.

谁能指导我如何实现这一目标?

Can anybody give me guidance in how to achieve this?

推荐答案

DLL 重定向是一个相当新的功能(Windows 2000 IIRC).将您的 DLL 目录命名为 <myapp>.exe.local,Windows 将首先检查它是否有任何通过 LoadLibrary(Ex) 加载的内容.这包括延迟加载的 DLL.

DLL redirection is a fairly new feature (Windows 2000 IIRC). Name your DLL directory <myapp>.exe.local, and Windows will check it first for anything loaded via LoadLibrary(Ex). This includes delay-loaded DLLs.

相关文章