Group: Dynamic-Link Library - Library: kernel32
The FreeLibrary function decrements the reference count of the loaded dynamic-link library (DLL). When the reference count reaches zero, the module is unmapped from the address space of the calling process and the handle is no longer valid
Using LoadLibrary
Loading a string resource from an executable file
Storing registration key in the resources of an executable file
How to display a user-defined icon in the MessageBox dialog
Exporting DLL icon resources as .ICO files
BOOL FreeLibrary(
HMODULE hModule // handle to DLL module
);
DECLARE INTEGER FreeLibrary IN kernel32;
INTEGER hLibModule
hModule [in] Handle to the loaded DLL module. The LoadLibrary or GetModuleHandle function returns this handle.
If the function succeeds, the return value is nonzero
Each process maintains a reference count for each loaded library module. This reference count is incremented each time LoadLibrary is called and is decremented each time FreeLibrary is called.
A DLL module loaded at process initialization due to load-time dynamic linking has a reference count of one. This count is incremented if the same module is loaded by a call to LoadLibrary.