Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

GetUserDefaultLCID function

Returns the locale identifier for the user default locale.

Caution  If the user default locale is a custom locale, an application cannot accurately tag data with the value or exchange it. In this case, the application should use GetUserDefaultLocaleName in preference to GetUserDefaultLCID.

Note  Applications that are intended to run only on Windows Vista and later should use GetUserDefaultLocaleName.

Syntax


LCID GetUserDefaultLCID(void);

Parameters

This function has no parameters.

Return value

Returns the locale identifier for the user default locale, represented as LOCALE_USER_DEFAULT. If the user default locale is a custom locale, this function always returns LOCALE_CUSTOM_DEFAULT, regardless of the custom locale that is selected. For example, whether the user locale is Hawaiian (US), haw-US, or Fijiian (Fiji), fj-FJ, the function returns the same value.

Remarks

This function can retrieve data from custom locales. Data is not guaranteed to be the same from computer to computer or between runs of an application. If your application must persist or transmit data, see Using Persistent Locale Data.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winnls.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

National Language Support Functions
ConvertDefaultLocale
GetLocaleInfo
GetSystemDefaultLCID
GetUserDefaultLocaleName

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.