简体   繁体   中英

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.

So that I can use LoadLibrary(dllname) (if it is inside 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 . Which you don't need to use LoadLibrary() for, you can use GetModuleHandle() instead, since kernel32.dll is loaded by default in all processes.

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() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM