[英]How can I use LoadLibrary to get the address of a function defined in fileapi.h?
I want to know the name of the DLL/LIB in which functions declared in fileapi.h
are kept.我想知道保存在
fileapi.h
中声明的函数的 DLL/LIB 的名称。
So that I can use LoadLibrary(dllname)
(if it is inside DLL).这样我就可以使用
LoadLibrary(dllname)
(如果它在 DLL 中)。
The fileapi.h header documentation lists the functions, and their individual documentations all say the same thing - the functions are implemented in kernel32.dll
. fileapi.h header文档列出了这些函数,它们各自的文档都说了同样的话——这些函数在
kernel32.dll
中实现。 Which you don't need to use LoadLibrary()
for, you can use GetModuleHandle()
instead, since kernel32.dll
is loaded by default in all processes.您不需要使用
LoadLibrary()
,您可以使用GetModuleHandle()
代替,因为kernel32.dll
在所有进程中默认加载。
To get the address of a function in a loaded DLL module, you need to use GetProcAddress()
, giving it an HMODULE
from LoadLibrary/Ex()
or GetModuleHandle()
.要在加载的 DLL 模块中获取 function 的地址,您需要使用
GetProcAddress()
,并从LoadLibrary/Ex()
或GetModuleHandle()
为其提供HMODULE
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.