subcalls.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
KbdFlushBuffer (1.2)
◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_KBD
USHORT KbdFlushBuffer(hkbd)
HKBD hkbd; /* keyboard handle */
The KbdFlushBuffer function removes all keystroke information from the input
buffer of the specified logical keyboard, but only if the keyboard has the
focus or is the default keyboard.
The KbdFlushBuffer function is a family API function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hkbd Identifies the logical keyboard to clear. The handle must have
been created previously by using the KbdOpen function.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
ERROR_KBD_DETACHED
ERROR_KBD_INVALID_HANDLE
Restrictions
In real mode, the following restriction applies to the KbdFlushBuffer
function:
♦ The hkbd parameter is ignored.
Example
This example opens a logical keyboard and calls KbdFlushBuffer to remove any
keystrokes from the input buffer:
HKBD hkbd;
KbdOpen(&hkbd);
.
.
.
KbdFlushBuffer(hkbd);
See Also
KbdCharIn, KbdOpen
♦