Retrieves information about any valid installed or available code page.
BOOL GetCPInfoExW(
UINT CodePage,
DWORD dwFlags,
LPCPINFOEXW lpCPInfoEx
)
CodePage
Type: UINT
Identifier for the code page for which to retrieve information. The application can specify the code page identifier for any installed or available code page, or one of the following predefined values. See Code Page Identifiers for a list of identifiers for ANSI and other code pages.
dwFlags
Type: DWORD
Reserved; must be 0.
lpCPInfoEx
Type: LPCPINFOEXW
Pointer to a CPINFOEX structure that receives information about the code page.
Type: BOOL
Returns a nonzero value if successful, or 0 otherwise. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
The information retrieved in the CPINFOEX structure is not always useful for all code pages. To determine buffer sizes, for example, the application should call MultiByteToWideChar or WideCharToMultiByte to request an accurate buffer size. If CPINFOEX settings indicate that a lead byte exists, the conversion function does not necessarily handle lead bytes differently, for example, in the case of a missing or illegal trail byte.
Header: Declared in winnls.h.
Library: Use kernelx.lib.