This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS
Note: This is legacy API call. It is recommended to use 32-bit equivalent
This call clears the keystroke buffer.
KbdFlushBuffer (KbdHandle)
rc (USHORT) - return
Return code descriptions are:
KbdFlushBuffer completes when the handle has access to the physical keyboard (focus), or is equal to zero and no other handle has the focus.
Some options operate differently in the DOS mode than in the OS/2 mode. The KbdHandle is ignored when coding in the DOS mode.
#define INCL_KBD USHORT rc = KbdFlushBuffer(KbdHandle); HKBD KbdHandle; /* Keyboard handle */ USHORT rc; /* return code */
EXTRN KbdFlushBuffer:FAR INCL_KBD EQU 1 PUSH WORD KbdHandle ;Keyboard handle CALL KbdFlushBuffer Returns WORD
Text based on http://www.edm2.com/index.php/KbdFlushBuffer_(FAPI)