Locale Identifier (LCID)

The IDispatch interface uses the 32-bit Windows definition of a LCID to identify locales. An LCID is a DWORD value that contains the LANGID in the lower word and a reserved value in the upper word. The bits are as follows:

This LCID has the components necessary to uniquely identify one of the installed system-defined locales.

/*
 * LCID creation/extraction macros:
 * MAKELCID - construct locale ID from language ID and country code.
 */
#define MAKELCID(l) ((DWORD)(((WORD)(l))|(((DWORD)((WORD)(0))) << 16)))

There are two predefined LCID values. LOCALE_SYSTEM_DEFAULT is the system default locale, and LOCALE_USER_DEFAULT is the current user''s locale. However, when querying the NLS APIs for information, it is more efficient to query once for the current locale with GetSystemDefaultLCID or GetUserDefaultLCID, rather than using these constants.