LoadLibrary And GetProcAddress And FreeLibrary
2009-03-02 21:29
363 查看
LoadLibrary
HMODULE WINAPI LoadLibrary(
__in LPCTSTR lpFileName
);
Return Value
If the function succeeds, the return value is a handle to the module.If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
If lpFileName does not include a path and there is more than one loaded module with the same base name and extension, the function returns a handle to the module that was loaded first.
GetProcAddress
Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
FARPROC WINAPI GetProcAddress(
__in HMODULE hModule,
__in LPCSTR lpProcName
);
Return Value
If the function succeeds, the return value is the address of the exported function or variable.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
TEST
HMODULE WINAPI LoadLibrary(
__in LPCTSTR lpFileName
);
Return Value
If the function succeeds, the return value is a handle to the module.If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
If lpFileName does not include a path and there is more than one loaded module with the same base name and extension, the function returns a handle to the module that was loaded first.
GetProcAddress
Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
FARPROC WINAPI GetProcAddress(
__in HMODULE hModule,
__in LPCSTR lpProcName
);
Return Value
If the function succeeds, the return value is the address of the exported function or variable.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
TEST
相关文章推荐
- LoadLibrary GetProcAddress FreeLibrary 近距应用
- linux下的"LoadLibrary & GetProcAddress"
- Wince LoadLibrary失败,GetLastError= 193
- GetProcAddress来自msdn 2010-7-12 15:17
- Different between session.get() and session.load()
- 实现GetProcAddress
- x64系统的判断和x64下文件和注册表访问的重定向(举例了GetProcAddress后转成函数指针的用法)
- 使用API函数GetProcAddress的注意事项
- GetProcAddress
- GetProcAddress()在C和C++中的区别
- 解决 LoadLibraryExA 、 LoadLibrary 参数错误 GetLastError()值87
- MyGetProcAddress
- 解析Delphi中的LoadLibrary,GetProcAddress,FreeLibrary
- dll的输出函数使用__stdcall调用约定后,客户端用GetProcAddress出现的问题!
- 通过GetProcAddress函数动态调用dll中地函数,是否必须通过extern C声明导出函数?
- GetProcAddress 使用注意事项
- 显试调用DLL------GetProcAddress的使用
- Windows API封装:LoadLibrary/FreeLibrary
- 使用汇编代码获取GetProcAddress函数地址的大致步骤(面试题系列)
- Get Local IP Address and Set in the IP Control