MLSetMLHInstance

This function records the loading of an MUI satellite library for a given language.

Declaration

HRESULT 
MLSetMLHInstance (
    HINSTANCE hInstance, 
    LANGID wLangID);

Parameters

The hInstance argument is a module handle for an MUI satellite library such as loaded through MLLoadLibrary.

The wLangID argument specifies the language for the library.

Return Value

The function returns zero for success, else an error code.

Behaviour

The function merely records the association of instance and language. For all cases of failure, the returned error code is E_OUTOFMEMORY.

If hInstance is NULL, as may happen when the function is called for a failing MLLoadLibrary, the function has nothing useful to record, and fails. If memory cannot be found in which to record the arguments, the function fails. If a DPA is not yet created for all such records, and the function cannot create one, then the function fails. If the record for this execution cannot be appended to this DPA, the function fails.

Availability

The MLSetMLHInstance function is exported from SHLWAPI.DLL as ordinal 430 in version 5.00 and higher.

Though this function dates from as long ago as 1999, it was still not documented by Microsoft as late as the January 2007 edition of the Windows Vista Software Development Kit (SDK).