Load Dll without execute dllmain function(加载 Dll 而不执行 dllmain 函数)
问题描述
我想加载特殊的 dll 而不执行 dllmain 函数.
I want to load special dll without execute dllmain function.
我认为,在 dllmain 设置断点可以解决这个问题.
I think, set a breakpoint at dllmain can solve this problem.
但我不知道该怎么办?
我也想调用dll的导出函数.
Also I want call dll's export function.
我曾尝试将 LoadLibraryEx 与 dont_resolve_dll_references 一起使用,但在 dll 的函数调用中出现错误.
I have tried to use LoadLibraryEx with dont_resolve_dll_references, but it occurs error with dll's function call.
我该如何解决这个问题?请给我你的想法.
How can I solve this? Please give me your idea.
谢谢.
推荐答案
如本问题所述:Win32 API枚举dll导出函数?
您可以将 LoadLibraryEx 与 DONT_RESOLVE_DLL_REFERENCES 标志一起使用,即使强烈建议不要使用该标志.如果是这样,如果你真的想使用它,你可能必须释放并重新加载 dll.
You can use LoadLibraryEx with the DONT_RESOLVE_DLL_REFERENCES flag, even though use of that flag is strongly discouraged. If so you will likely have to free and reload the dll if you actually want to use it.
这篇关于加载 Dll 而不执行 dllmain 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:加载 Dll 而不执行 dllmain 函数
基础教程推荐
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- CString 到 char* 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 初始化列表*参数*评估顺序 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
