Skip to content

Latest commit

 

History

History
147 lines (113 loc) · 5.88 KB

nf-winnls-enumsystemlocalesa.md

File metadata and controls

147 lines (113 loc) · 5.88 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winnls.EnumSystemLocalesA
EnumSystemLocalesA function (winnls.h)
Enumerates the locales that are either installed on or supported by an operating system.Note  For interoperability reasons, the application should prefer the EnumSystemLocalesEx function to EnumSystemLocales because Microsoft is migrating toward the use of locale names instead of locale identifiers for new locales. Any application that will be run only on Windows Vista and later should use EnumSystemLocalesEx. (ANSI)
EnumSystemLocalesA
LCID_ALTERNATE_SORTS
LCID_INSTALLED
LCID_SUPPORTED
winnls/EnumSystemLocalesA
intl\enumsystemlocales.htm
Intl
e6341460-3c4e-4040-8b49-3eb7d279e571
12/05/2018
EnumSystemLocales, EnumSystemLocales function [Internationalization for Windows Applications], EnumSystemLocalesA, EnumSystemLocalesW, LCID_ALTERNATE_SORTS, LCID_INSTALLED, LCID_SUPPORTED, _win32_EnumSystemLocales, intl.enumsystemlocales, winnls/EnumSystemLocales, winnls/EnumSystemLocalesA, winnls/EnumSystemLocalesW
winnls.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
EnumSystemLocalesW (Unicode) and EnumSystemLocalesA (ANSI)
Kernel32.lib
Kernel32.dll
Windows
19H1
EnumSystemLocalesA
winnls/EnumSystemLocalesA
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-Localization-l1-2-0.dll
KernelBase.dll
API-MS-Win-Core-Localization-l1-2-1.dll
API-MS-Win-Core-misc-l1-1-0.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
API-MS-Win-Core-Localization-L1-2-2.dll
EnumSystemLocales
EnumSystemLocalesA
EnumSystemLocalesW

EnumSystemLocalesA function

-description

Enumerates the locales that are either installed on or supported by an operating system.

Note  For interoperability reasons, the application should prefer the EnumSystemLocalesEx function to EnumSystemLocales because Microsoft is migrating toward the use of locale names instead of locale identifiers for new locales. Any application that will be run only on Windows Vista and later should use EnumSystemLocalesEx.
 

-parameters

-param lpLocaleEnumProc [in]

Pointer to an application-defined callback function. For more information, see EnumLocalesProc.

-param dwFlags [in]

Flags specifying the locale identifiers to enumerate. The flags can be used singly or combined using a binary OR. If the application specifies 0 for this parameter, the function behaves as for LCID_SUPPORTED.

Value Meaning
LCID_INSTALLED
Enumerate only installed locale identifiers. This value cannot be used with LCID_SUPPORTED.
LCID_SUPPORTED
Enumerate all supported locale identifiers. This value cannot be used with LCID_INSTALLED.
LCID_ALTERNATE_SORTS
Enumerate only the alternate sort locale identifiers. If this value is used with either LCID_INSTALLED or LCID_SUPPORTED, the installed or supported locales are retrieved, as well as the alternate sort locale identifiers.

-returns

Returns a nonzero value if successful, or 0 otherwise. To get extended error information, the application can call GetLastError, which can return one of the following error codes:

  • ERROR_BADDB. The function could not access the data. This situation should not normally occur, and typically indicates a bad installation, a disk problem, or the like.
  • ERROR_INVALID_FLAGS. The values supplied for flags were not valid.
  • ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.

-remarks

The function enumerates locales by passing locale identifiers, one at a time, to the specified application-defined callback function. This continues until all of the installed or supported locale identifiers have been passed to the callback function or the callback function returns FALSE.

Note

The winnls.h header defines EnumSystemLocales as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

EnumLocalesProc

EnumSystemLocalesEx

National Language Support

National Language Support Functions