title | description | author | ms.author | ms.topic | keywords | f1_keywords | MS-HAID | MSHAttr | ms.assetid | topic_type | api_name | api_location | api_type | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GetConsoleMode function |
Retrieves the current input mode of a console's input buffer or the current output mode of a console screen buffer. |
miniksa |
miniksa |
article |
console, character mode applications, command line applications, terminal applications, console api |
|
|
|
49adf618-196d-4490-93ca-cd177807f58e |
|
|
|
|
Retrieves the current input mode of a console's input buffer or the current output mode of a console screen buffer.
BOOL WINAPI GetConsoleMode(
_In_ HANDLE hConsoleHandle,
_Out_ LPDWORD lpMode
);
hConsoleHandle [in]
A handle to the console input buffer or the console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.
lpMode [out]
A pointer to a variable that receives the current mode of the specified buffer.
[!INCLUDE console-mode-flags]
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
[!INCLUDE console-mode-remarks]
To change a console's I/O modes, call SetConsoleMode function.
For an example, see Reading Input Buffer Events.
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | ConsoleApi.h (via WinCon.h, include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |