延迟加载 DLL

我迫切需要帮助,我需要在 Visual Studio 中管理应用程序依赖项.应用程序仅在特定版本的 Windows 上链接到 DLL,比如 Windows 7.在其他环境中,不应加载 DLL.我将如何使用 DLL 延迟加载来实现这一目标,因为这个主题对我来说是全新的,并且在网上没有关于这个特定问题的任何好的参考资料.

I am in desperate need of help, I need to manage an application dependency in Visual Studio. The application links to a DLL only on a specific version of windows, lets say Windows 7. and on other environments, the DLL should not be loaded. How will I be able to achieve that using DLL Delay Loading as this topic is completely new to me and there isn't any good references online for this particular matter.

问候

推荐答案

通过在链接器/输入/延迟加载的 DLL 字段中指定它,您的项目可以指定它所依赖的 dll 应该但在需要时加载.对于不同的构建配置,此设置可能不同.

Your project can specify that a dll it depends upon should but be loaded when needed, by specifying it in the Linker/Input/Delay Loaded DLLs field. This setting can be different for different build configurations.

相关文章