 |
FreeLibrary ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
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 |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL FreeLibrary(
HMODULE hModule // handle to DLL module
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER FreeLibrary IN kernel32;
INTEGER hLibModule
|
 |
 |
 |
| Parameters: |
 |
hModule
[in] Handle to the loaded DLL module. The LoadLibrary or GetModuleHandle function returns this handle. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero |
 |
 |
| My comment: |
 |
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. |
 |
 |
| Word Index links for the FreeLibrary : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-07-12 12:00:00 | | Modified: | 2003-05-15 15:23:44 | Visited in last 7 days: 37 |