从DLL内获取HModule [英] Get HModule from inside a DLL

查看:410
本文介绍了从DLL内获取HModule的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从我的DLL中加载一些资源(我需要从DLL代码中加载它们),因为我正在使用FindResource。



要做我需要DLL的HModule。
如何找到?



(我不知道DLL的名称(文件名)(用户可以更改它))

解决方案

DllMain() 是DLL的 HMODULE


I need to load some resource from my DLL (i need to load them from the DLL code), for doing that I'm using FindResource.

To do that i need the HModule of the DLL. How to find that?

(I do not know the name (filename) of the DLL (the user can change it))

解决方案

The first argument to DllMain() is the HMODULE of the DLL.

这篇关于从DLL内获取HModule的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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