Compartir a través de


IsValidLocale

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

BOOL IsValidLocale(
  LCID Locale, 
  DWORD dwFlags 
); 

Parameters

  • Locale
    [in] Locale identifier to be validated. You can use the MAKELCID macro to create a locale identifier.
  • dwFlags
    [in] Value that specifies the validity test to apply to the locale identifier. The following table shows the values this parameter can take.

    Value Description

    LCID_INSTALLED

    Test whether the locale identifier is both supported and installed.

    LCID_SUPPORTED

    Test whether the locale identifier is supported.

Return Value

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 Embedded CE does not support the downloading of code pages to a device.

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

Reference

GetLocaleInfo
MAKELCID

Other Resources

National Language Support (NLS) Locale Identifiers