LoadLibrary And GetProcAddress And FreeLibrary

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
原文地址:https://www.cnblogs.com/taoxu0903/p/1401777.html