Kernel32GetThreadPreferredUILanguages(MuiLanguageMode, UInt32, StringBuilder, UInt32) Method

Retrieves the thread preferred UI languages for the current thread.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, 
	SetLastError = true)]
public static bool GetThreadPreferredUILanguages(
	MuiLanguageMode flags,
	out uint refNumLanguages,
	StringBuilder languagesBuffer,
	ref uint refLanguagesBufferSize
)

Parameters

flags  MuiLanguageMode
Flags identifying the language format to use for the process preferred UI languages.
refNumLanguages  UInt32
Pointer to the number of languages retrieved in languagesBuffer.
languagesBuffer  StringBuilder
Optional. Pointer to a double null-terminated multi-string buffer in which the function retrieves an ordered, null-delimited list in preference order, starting with the most preferable.

Alternatively if this parameter is set to NULL and pcchLanguagesBuffer is set to 0, the function retrieves the required size of the language buffer in refLanguagesBufferSize.

The required size includes the two null characters.

refLanguagesBufferSize  UInt32
Pointer to the size, in characters, for the language buffer indicated by languagesBuffer.

On successful return from the function, the parameter contains the size of the retrieved language buffer.

Alternatively if this parameter is set to 0 and languagesBuffer is set to NULL, the function retrieves the required size of the language buffer in refLanguagesBufferSize.

Return Value

Boolean
If the function succeeds, the return value is . If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also