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

GetLocaleInfo (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function retrieves information about a locale.

int GetLocaleInfo(
  LCID Locale, 
  LCTYPE LCType, 
  LPTSTR lpLCData, 
  int cchData 
); 

Parameters

Locale
[in] Value that specifies the locale to retrieve information for. This parameter can be a locale identifier created by the MAKELCID macro, or one of the following predefined values. The following table shows the values this parameter can take.
ValueDescription
LOCALE_SYSTEM_DEFAULTDefault system locale.
LOCALE_USER_DEFAULTDefault user locale.
LOCALE_NEUTRALDefault language-neutral locale.
LCType
[in] Value that specifies one of the LCTYPE constants to indicate the type of information to be retrieved.

All LCTYPE values are mutually exclusive, with the exception of LOCALE_NOUSEROVERRIDE. An application may use the binary-OR operator to combine LOCALE_NOUSEROVERRIDE with any other LCTYPE value. If passed such an LCType value, the function bypasses user overrides, and returns the system default value for the requested LCID.

lpLCData
[out] Pointer to a buffer to receive the requested data.
cchData
[in] Size, in characters, of the lpLCData buffer. If cchData is zero, the function returns the number of characters required to hold the information, and the buffer pointed to by lpLCData is not used.

Return Values

The number of bytes or characters written to the destination buffer, or, if the cchData parameter is zero, the number of characters required to hold the locale information indicates success. Zero indicates failure. To get extended error information, call the GetLastError function. The following table shows possible return values for the GetLastError function.

ValueDescription
ERROR_INSUFFICIENT_BUFFERThe data area passed to a system call is too small.
ERROR_INVALID_FLAGSThe flags are invalid.
ERROR_INVALID_PARAMETERThe parameter is incorrect.

Remarks

The GetLocaleInfo function always retrieves information in text format. If the information is a numeric value, the function converts the number to text using decimal notation.

For more information about locales, see National Language support (NLS) Locale Identifiers.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winnls.h.
Link Library: Coreloc.lib.

See Also

National Language support (NLS) Locale Identifiers | MAKELCID | LCTYPE Constants


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.