Kernel32SetThreadPreferredUILanguages Method
Sets the process preferred UI languages for the current thread.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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 SetThreadPreferredUILanguages(
MuiLanguageMode flags,
string languagesBuffer,
out uint refNumLanguages
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, ExactSpelling := true,
SetLastError := true>]
Public Shared Function SetThreadPreferredUILanguages (
flags As MuiLanguageMode,
languagesBuffer As String,
<OutAttribute> ByRef refNumLanguages As UInteger
) As Boolean
Dim flags As MuiLanguageMode
Dim languagesBuffer As String
Dim refNumLanguages As UInteger
Dim returnValue As Boolean
returnValue = Kernel32.SetThreadPreferredUILanguages(flags,
languagesBuffer, refNumLanguages)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, ExactSpelling = true,
SetLastError = true)]
static bool SetThreadPreferredUILanguages(
MuiLanguageMode flags,
String^ languagesBuffer,
[OutAttribute] unsigned int% refNumLanguages
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true,
SetLastError = true)>]
static member SetThreadPreferredUILanguages :
flags : MuiLanguageMode *
languagesBuffer : string *
refNumLanguages : uint32 byref -> bool
No code example is currently available or this language may not be supported.
- flags MuiLanguageMode
-
Flags identifying the language format to use for the thread preferred UI languages.
- languagesBuffer String
-
Pointer to a double null-terminated multi-string buffer that contains an ordered,
null-delimited list in decreasing order of preference.
If there are more than five languages in the buffer, the function only sets the first five valid languages.
Alternatively, this parameter can contain NULL if no language list is required.
In this case, the function clears the preferred UI languages for the thread.
- refNumLanguages UInt32
-
Pointer to the number of languages that has been set in the process language list from the input buffer,
up to a maximum of five.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.