EnumSystemCodePagesW

Enumerates the code pages that are either installed on or supported by an operating system.

Syntax

BOOL EnumSystemCodePagesW(
         CODEPAGE_ENUMPROCW lpCodePageEnumProc,
         DWORD dwFlags
)  

Parameters

lpCodePageEnumProc
Type: CODEPAGE_ENUMPROCW 

Pointer to an application-defined callback function. The EnumSystemCodePages function enumerates code pages by making repeated calls to this callback function. For more information, see EnumCodePagesProc.

dwFlags
Type: DWORD 

Flag specifying the code pages to enumerate. This parameter can have one of the following values, which are mutually exclusive.

Return value

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:

Remarks

This function enumerates the code pages by passing code page identifiers, one at a time, to the specified application-defined callback function. This process continues until all installed or supported code page identifiers have been passed to the callback function, or the callback function returns FALSE.

When an application is using this function to determine an appropriate code page for saving data, it should use Unicode when possible. Other code pages are not as portable as Unicode between vendors or operating systems, due to different implementations of the associated standards.

Requirements

Header: Declared in winnls.h.

Library: Use kernelx.lib.