GetCPInfoEx function
Applies to: desktop apps | Metro style apps
Retrieves information about any valid installed or available code page.
Syntax
BOOL GetCPInfoEx( __in UINT CodePage, __in DWORD dwFlags, __out LPCPINFOEX lpCPInfoEx );
Parameters
- CodePage [in]
-
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 [in]
-
Reserved; must be 0.
- lpCPInfoEx [out]
-
Pointer to a CPINFOEX structure that receives information about the code page.
Return value
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:
- ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.
Remarks
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.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | GetCPInfoExW (Unicode) and GetCPInfoExA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012