Enumerates the locales that are either installed on or supported by an operating system.
Note
The application should call this function in preference to EnumSystemLocales if designed to run only on Windows Vista and later.
BOOL EnumSystemLocalesEx(
LOCALE_ENUMPROCEX lpLocaleEnumProcEx,
DWORD dwFlags,
LPARAM lParam,
LPVOID lpReserved
)
lpLocaleEnumProcEx
Type: LOCALE_ENUMPROCEX
Pointer to an application-defined callback function. The EnumSystemLocalesEx function enumerates locales by making repeated calls to this callback function. For more information, see EnumLocalesProcEx.
dwFlags
Type: DWORD
Flags identifying the locales 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 LOCALE_ALL.
lParam
Type: LPARAM
An application-provided parameter to be passed to the callback function. This is especially useful for multi-threaded applications.
lpReserved
Type: LPVOID
Reserved; must be NULL.
Type: BOOL
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:
This function enumerates locales by passing locale names, one at a time, to the application-defined callback function specified by lpLocaleEnumProcEx. Enumeration continues until all installed or supported names have been passed to the callback function or the callback function returns FALSE.
The choices for the dwFlags parameter are different from those for EnumSystemLocales, which must distinguish between installed and supported locales.
If dwFlags specifies LOCALE_ALTERNATE_SORTS, the callback function is called for every locale that represents an alternate sort order. For example, Spanish (Spain) defaults to international sort order, but traditional sort order is available for an alternate sort. German (Germany) defaults to dictionary sort order, but there is an alternate phone book sort order available.
Header: Declared in winnls.h.
Library: Use kernelx.lib.