IsValidLocale

This function applies a validity test to a locale identifier. The dwFlags parameter determines the nature of the validity test. Currently, the function tests whether a locale identifier is installed or supported on the calling system.

At a Glance

Header file: Winnls.h
Windows CE versions: 1.0 and later

Syntax

BOOL IsValidLocale(LCID Locale, DWORD dwFlags);

Parameters

Locale

[in] Specifies the locale identifier to be validated. You can use the MAKELCID macro to create a locale identifier.

dwFlags

[in] Specifies the validity test to apply to the locale identifier. This parameter can be one of the following values:

Value Description
LCID_INSTALLED Test whether the locale identifier is both supported and installed.
LCID_SUPPORTED Test whether the locale identifier is supported.

Return Values

Nonzero indicates that the locale identifier passes the specified validity test. Zero indicates that the locale identifier does not pass the specified validity test.

Remarks

If the LCID_INSTALLED flag is specified and this function returns a nonzero value, the locale identifier is both supported and installed on the system.

If the LCID_SUPPORTED flag is specified and this function returns zero, the locale identifier is supported in the release, but not necessarily installed on the system. Windows CE does not support the downloading of code pages to a device.

See Also

GetLocaleInfo