Windows GUI [英] windows gui
问题描述
好吧,我有一个空白的win32 dll,我想开始对将在我的桌面上显示的gui进行编码,但不确定是否要注入该dll或在哪里?
如果有人知道我该怎么做,请
Well i have a blank win32 dll and i want to start coding a gui that will show on my desktop but am not shure if i would inject the dll or where?
If anyone knows how i could do this please post.
推荐答案
调用从DLL导出的函数有两种方法-第一种也是最简单的方法是包含一个声明该函数的标头,并用__declspec(dllimport)进行适当标记-因为我们没有使用未定义该函数的函数,然后链接到在构建DLL的过程中创建的导入库.
There are two way to call a function that has been exported from a DLL - the first, and easiest method, is to include a header that declares the function, appropriately marked with __declspec(dllimport) - because we are not using the function not defining it, and then to link to the import library that is created during the process of building the DLL.
不太容易的第二种方法是上面所述的方法:使用 LoadLibrary 加载DLL,然后使用
The second, and less easy method, is what you describe above: use LoadLibrary to load the DLL and then use GetProcAddress to get a pointer to the function ... you can then use this pointer to call the function.
这篇关于Windows GUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!