Platform SDK: DLLs, Processes, and Threads

FreeLibrary32W

Use the FreeLibrary32W function in 16-bit code to free a Win32 DLL that it had previously loaded with the LoadLibraryEx32W function.

DWORD FAR PASCAL FreeLibrary32W(
  DWORD hInst  // handle to loaded library module
);

Parameters

hInst
[in] Handle to the loaded library module. Returned by LoadLibraryEx32W.

Return Values

Returns TRUE if successful or FALSE otherwise.

Remarks

The system does not do any cleanup of 32-bit thunk DLLs when the 16-bit application exits. The 16-bit application or DLL must free the 32-bit thunk DLL when it is finished using it.

Windows 95/98: This function releases the Win16Mutex. If this function is called from a 16-bit DLL, it can be reentered as soon as the 32-bit DLL entry-point function is called. This happens when another 32-bit process thunks to the 16-bit DLL or when another 16-bit DLL calls this 16-bit DLL. However, if this function is called in a 16-bit application and the 32-bit DLL entry-point function does not yield, the function is not reentered.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Wownt16.h.

See Also

Generic Thunks Overview, 16-bit Generic Thunk Functions, LoadLibraryEx32W