Kernel32GetUserDefaultLocaleName Method

Retrieves the user default locale name.

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 GetUserDefaultLocaleName(
	StringBuilder localeName,
	int length
)

Parameters

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.

Return Value

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.

Remarks

See Also