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

查看:705
本文介绍了加载DLL而不执行dllmain函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不执行dllmain函数的情况下加载特殊的dll.

I want to load special dll without execute dllmain function.

我认为,在dllmain处设置一个断点可以解决此问题.

I think, set a breakpoint at dllmain can solve this problem.

但是我不知道该怎么办?

But I don't know How can I do?

我也想调用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.

谢谢.

推荐答案

如此问题所述:即使强烈反对使用该标志,也可以将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天全站免登陆