SetUserDefaultLCID

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function sets the locale identifier (LCID) for the current user. This updates the user locale and the user locale descriptor.

Note

If you specify a locale with the LCID parameter and that locale is not installed or available on the Windows® phone, the function fails with ERROR_INVALID_PARAMETER. To determine whether the locale is supported or not, call IsValidLocale.

Syntax

BOOL SetUserDefaultLCID(
  LCID Locale
);

Parameters

  • Locale
    Locale identifier to set as the user's default locale.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

Applications that use SetUserDefaultLCID are required to have OEM_CERTIFY_TRUST privileges, or the function will fail with an ERROR_ACCESS_DENIED message. **

An application that calls SetUserDefaultLCID must send out a system-wide notification by calling the PostMessage function and passing the following parameters:

PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0, INI_INTL);

Requirements

Header windows.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

Concepts

Language Identifiers and Locales

Other Resources

National Language Support (NLS) Functions