INtime SDK Help
FreeLibrary (iwin32)
INtime SDK v6 > About INtime > Alternate APIs > iwin32 API > iwin32 API > FreeLibrary (iwin32)

Indicates that the given RSL can be unloaded. Entrypoint addresses obtained by GetProcAddress should no longer be used.

BOOLEAN FreeLibrary(
    HMODULE hModule
);

Parameters

hModule
Handle to the loaded library module.

LoadLibrary or GetModuleHandle returns this handle.

Remarks

This function is implemented by the INtime function FreeRtLibrary.

Before unmapping a library module, the system enables the RSL to detach from the process by calling the RSL's RslMain function, if one exists, with the RSL_PROCESS_DETACH value. Doing so gives the RSL an opportunity to clean up resources allocated on behalf of the current process.

After the entry-point function returns, the library module is removed from the process address space.

Calling FreeLibrary does not affect other processes using the same library module.

Return Values

non-0 (zero)
Success.
0 (zero)
Failure. For extended error information, see GetLastError.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/winbase.h windows.h iwin32.lib

Note

This function operates in the real-time portion of your application.

See Also

Shared Libraries