Platform SDK: DLLs, Processes, and Threads

LoadLibraryEx32W

Use the LoadLibraryEx32W function in 16-bit code to load a Win32 DLL.

DWORD FAR PASCAL LoadLibraryEx32W(
  LPCSTR lpszLibFile,  // name of executable module
  DWORD hFile,         // reserved, must be NULL
  DWORD dwFlags        // entry-point execution flag
);

Parameters

lpszLibFile
[in] Pointer to a null-terminated string that names a Win32-based DLL module.
hFile
[in] This parameter is reserved for future use. It must be NULL.
dwFlags
[in] Specifies the action to take when loading the module. This parameter can be one of the following values:

DONT_RESOLVE_DLL_REFERENCES
LOAD_LIBRARY_AS_DATAFILE
LOAD_WITH_ALTERED_SEARCH_PATH

For more information on these values, see LoadLibraryEx.

Return Values

If the function succeeds, the return value is a 32-bit handle to a DLL module. If the function fails, the return value is NULL.

Remarks

After calling this function, the 16-bit thunk DLL can call the GetProcAddress32W function to get the address of the 32-bit entrypoint function(s) and then call the thunk(s) by using the CallProcEx32W function.

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, CallProcEx32W, GetProcAddress32W