title | description | author | ms.author | ms.topic | keywords | f1_keywords | MS-HAID | MSHAttr | ms.assetid | topic_type | api_name | api_location | api_type | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SetConsoleMode function |
Sets the input mode of a console's input buffer or the output mode of a console screen buffer. |
miniksa |
miniksa |
article |
console, character mode applications, command line applications, terminal applications, console api |
|
|
|
77508d58-8a7a-4c47-9ec5-dc61e5c4beac |
|
|
|
|
Sets the input mode of a console's input buffer or the output mode of a console screen buffer.
BOOL WINAPI SetConsoleMode(
_In_ HANDLE hConsoleHandle,
_In_ DWORD dwMode
);
hConsoleHandle [in]
A handle to the console input buffer or a console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.
dwMode [in]
The input or output mode to be set.
[!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 determine the current mode of a console input buffer or a screen buffer, use the GetConsoleMode 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 |