Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function enumerates the locales that are either installed on or supported by a system.

Syntax

BOOL EnumSystemLocales(
  LOCALE_ENUMPROC 
lpLocaleEnumProc, 
  DWORD 
dwFlags
); 

Parameters

lpLocaleEnumProc

[in] Pointer to an application-defined callback function. The EnumSystemLocalesfunction enumerates locales by making repeated calls to this callback function. For more information, see the EnumLocalesProccallback function.

dwFlags

[in] Value that specifies the locale identifiers to enumerate. The following table shows the values this parameter can take.

Value Description

LCID_INSTALLED

Enumerate only installed locale identifiers.

LCID_SUPPORTED

Enumerate all supported locale identifiers.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call the GetLastError. The following table shows possible return values for the GetLastErrorfunction.

Value Description

ERROR_INVALID_PARAMETER

A parameter is incorrect.

Remarks

The LCID_INSTALLED and LCID_SUPPORTED flags are mutually exclusive.

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

Requirements

Header winnls.h
Library Coreloc.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also