加载 Dll 而不执行 dllmain 函数 [英] Load Dll without execute dllmain function

查看:22
本文介绍了加载 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 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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