Export (0) Print
Expand All
Expand Minimize

MLLoadLibrary function

[This function is not available for use as of Windows 7.]

Maps an appropriate resource DLL into the address space of the calling function, based on the user's default UI language.

Syntax


HINSTANCE MLLoadLibrary(
  _In_  LPCTSTR lpszLibFileName,
  _In_  HMODULE hModule,
  _In_  DWORD dwCrossCodePage
);

Parameters

lpszLibFileName [in]

Type: LPCTSTR

A null-terminated string with the file name of the resource DLL to be loaded. Do not include any path information. MLLoadLibrary derives that information as described in the Remarks below.

hModule [in]

Type: HMODULE

A handle to an already-loaded DLL that represents the code library for which the multilingual resource library is being requested.

dwCrossCodePage [in]

Type: DWORD

Reserved. This parameter must be set to zero.

Return value

Type: HINSTANCE

Returns the module's handle if successful, or NULL otherwise.

Remarks

The MLLoadLibrary function locates the appropriate library through the following procedure.

  1. Windows 2000, Windows XP or later, Windows Server 2003: Calls the GetSystemDefaultUILanguage function to determine the system default UI language.
  2. Windows 2000, Windows XP or later, Windows Server 2003: Calls GetUserDefaultUILanguage to determine the user default UI language.
  3. If the system default UI language uses a different code page than the user default UI language, and the user default UI language is not US English (language 0x0409), the function ignores user default UI language. Instead, it uses the system default UI language as if it were the user default UI language in the computation below.
  4. If the hModule parameter is non-null and the user default UI language is the same as the system default UI language, then lpszLibFileName is assumed to be in the same directory as the DLL referenced by the hModule parameter.

    If the hModule parameter is NULL, or if the two languages differ, lpszLibFileName is assumed to be relative to the directory into which Windows Internet Explorer has been installed. It will be located in a subdirectory named MUI\abcd where "abcd" is the hexadecimal representation of the user default UI language. For example, if the user default UI language is Swedish (LCID 0x041D), the path might be "C:\Program Files\Internet Explorer\MUI\041D\filename.dll."

    Finally, if the hModule parameter is non-null and the file version of the DLL it refers to does not match the file version of the DLL whose path was computed earlier in this step, the path computed in this step is ignored. The value in lpszLibFileName is assumed to be in the same directory as the DLL referenced by the hModule parameter.

The instance handle returned by MLLoadLibraryW must be freed with the MLFreeLibrary function. Do not free it with the FreeLibrary function.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Shlwapi.h

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

MLLoadLibraryW (Unicode) and MLLoadLibraryA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft