0 out of 1 rated this helpful - Rate this topic

GetConsoleOutputCP function

Applies to: desktop apps only

Retrieves the output code page used by the console associated with the calling process. A console uses its output code page to translate the character values written by the various output functions into the images displayed in the console window.

Syntax

UINT WINAPI GetConsoleOutputCP(void);

Parameters

This function has no parameters.

Return value

The return value is a code that identifies the code page. For a list of identifiers, see Code Page Identifiers.

Remarks

A code page maps 256 character codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages. To retrieve more information about a code page, including it's name, see the GetCPInfoEx function.

To set a console's output code page, use the SetConsoleOutputCP function. To set and query a console's input code page, use the SetConsoleCP and GetConsoleCP functions.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wincon.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Console Code Pages
Console Functions
GetConsoleCP
SetConsoleCP
SetConsoleOutputCP

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
C# syntax
[DllImport("kernel32.dll")]
internal static extern uint GetConsoleOutputCP();
vb.net syntax
<DllImport("kernel32.dll")> _
Public Shared Function GetConsoleOutputCP() As UInt32
End Function