Platform SDK: International Features

GetCPInfoEx

The GetCPInfoEx function retrieves information about any valid installed or available code page.

BOOL GetCPInfoEx (
  UINT CodePage,         // code-page identifier
  DWORD dwFlags,         // flags (must be zero)
  LPCPINFOEX lpCPInfoEx  // structure for information
);

Parameters

CodePage
[in] Specifies the code page about which information is to be retrieved. You can specify the code-page identifier for any installed or available code page, or you can specify one of the following predefined values.
Value Meaning
CP_ACP Use the system default–ANSI code page.
CP_MACCP Windows NT/2000: Use the system default–Macintosh code page.
CP_OEMCP Use the system default–OEM code page.

dwFlags
Reserved. Must be zero.
lpCPInfoEx
[out] Pointer to a CPINFOEX structure that receives information about the code page.

Return Values

If the function succeeds, the return values is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

If the specified code page is not installed or not available, the GetCPInfoEx function sets the last-error value to ERROR_INVALID_PARAMETER.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in Winnls.h; include Windows.h.
  Library: Use Kernel32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows 2000.

See Also

National Language Support Overview, National Language Support Functions, GetACP, GetOEMCP, CPINFOEX