Kernel32GetUserDefaultLocaleName Method
Retrieves the user default locale name.
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 GetUserDefaultLocaleName(
StringBuilder localeName,
int length
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, ExactSpelling := true,
SetLastError := true>]
Public Shared Function GetUserDefaultLocaleName (
localeName As StringBuilder,
length As Integer
) As Boolean
Dim localeName As StringBuilder
Dim length As Integer
Dim returnValue As Boolean
returnValue = Kernel32.GetUserDefaultLocaleName(localeName,
length)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, ExactSpelling = true,
SetLastError = true)]
static bool GetUserDefaultLocaleName(
StringBuilder^ localeName,
int length
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true,
SetLastError = true)>]
static member GetUserDefaultLocaleName :
localeName : StringBuilder *
length : int -> bool
No code example is currently available or this language may not be supported.
- localeName StringBuilder
-
Pointer to a buffer in which this function retrieves the locale name.
- length Int32
-
Size, in characters, of the buffer indicated by localeName parameter.
The maximum possible length of a locale name, including a terminating null character, is LOCALE_NAME_MAX_LENGTH.
This is the recommended size to supply in this parameter.
Boolean
If the function succeeds, the return value is the size of the buffer containing the locale name, including the terminating null character.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.