Delay Loading DLLs(延迟加载 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.
这篇关于延迟加载 DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:延迟加载 DLL
基础教程推荐
- 初始化列表*参数*评估顺序 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- CString 到 char* 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
