Permalink
Fetching contributors…
Cannot retrieve contributors at this time
117 lines (90 sloc) 2.53 KB
title description author ms.author ms.topic ms.prod keywords MS-HAID MSHAttr ms.assetid topic_type api_name api_location api_type
FlushConsoleInputBuffer function
Flushes the console input buffer. All input records currently in the input buffer are discarded.
bitcrazed
richturn
article
console
console, character mode applications, command line applications, terminal applications, console api
\_win32\_flushconsoleinputbuffer
base.flushconsoleinputbuffer
consoles.flushconsoleinputbuffer
PreferredSiteName:MSDN
PreferredLib:/library/windows/desktop
6f7832d6-1fb2-4ca8-bd07-43123c990851
apiref
FlushConsoleInputBuffer
Kernel32.dll
API-MS-Win-Core-Console-l2-1-0.dll
KernelBase.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
DllExport

FlushConsoleInputBuffer function

Flushes the console input buffer. All input records currently in the input buffer are discarded.

Syntax

BOOL WINAPI FlushConsoleInputBuffer(
  _In_ HANDLE hConsoleInput
);

Parameters

hConsoleInput [in]
A handle to the console input buffer. The handle must have the GENERIC_WRITE access right. For more information, see Console Buffer Security and Access Rights.

Return value

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wincon.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Console Functions

Low-Level Console Input Functions

GetNumberOfConsoleInputEvents

PeekConsoleInput

ReadConsoleInput

WriteConsoleInput