This topic has not yet been rated - Rate this topic

FlushConsoleInputBuffer function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

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

 

 

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