KbdFlushBuffer (FAPI): Difference between revisions
Appearance
Created page with "==Description== This call clears the keystroke buffer. ==Syntax== <PRE> KbdFlushBuffer (KbdHandle) </PRE> ==Parameters== ; KbdHandle (HKBD) - input : Default keyboard ..." |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This call clears the keystroke buffer. | This call clears the keystroke buffer. | ||
==Syntax== | ==Syntax== | ||
KbdFlushBuffer (KbdHandle) | |||
KbdFlushBuffer | |||
==Parameters== | ==Parameters== | ||
; | ;KbdHandle (HKBD) - input: Default keyboard or the logical keyboard. | ||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
::0 NO_ERROR | |||
Return code descriptions are: | ::439 ERROR_KBD_INVALID_HANDLE | ||
::445 ERROR_KBD_FOCUS_REQUIRED | |||
::447 ERROR_KBD_KEYBOARD_BUSY | |||
::464 ERROR_KBD_DETACHED | |||
::504 ERROR_KBD_EXTENDED_SG | |||
==Remarks== | ==Remarks== | ||
Line 26: | Line 20: | ||
===Family API Considerations=== | ===Family API Considerations=== | ||
Some options operate differently in the DOS mode than in the OS/2 mode. The KbdHandle is ignored when coding in the DOS mode. | |||
==Bindings== | |||
===C=== | |||
== | |||
===C | |||
<PRE> | <PRE> | ||
#define INCL_KBD | #define INCL_KBD | ||
Line 36: | Line 29: | ||
USHORT rc = KbdFlushBuffer(KbdHandle); | USHORT rc = KbdFlushBuffer(KbdHandle); | ||
HKBD | HKBD KbdHandle; /* Keyboard handle */ | ||
USHORT rc; /* return code */ | |||
USHORT | |||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
EXTRN KbdFlushBuffer:FAR | EXTRN KbdFlushBuffer:FAR | ||
Line 51: | Line 43: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Kbd]] |
Latest revision as of 14:39, 28 February 2020
This call clears the keystroke buffer.
Syntax
KbdFlushBuffer (KbdHandle)
Parameters
- KbdHandle (HKBD) - input
- Default keyboard or the logical keyboard.
Return Code
- rc (USHORT) - return
- Return code descriptions are:
- 0 NO_ERROR
- 439 ERROR_KBD_INVALID_HANDLE
- 445 ERROR_KBD_FOCUS_REQUIRED
- 447 ERROR_KBD_KEYBOARD_BUSY
- 464 ERROR_KBD_DETACHED
- 504 ERROR_KBD_EXTENDED_SG
Remarks
KbdFlushBuffer completes when the handle has access to the physical keyboard (focus), or is equal to zero and no other handle has the focus.
Family API Considerations
Some options operate differently in the DOS mode than in the OS/2 mode. The KbdHandle is ignored when coding in the DOS mode.
Bindings
C
#define INCL_KBD USHORT rc = KbdFlushBuffer(KbdHandle); HKBD KbdHandle; /* Keyboard handle */ USHORT rc; /* return code */
MASM
EXTRN KbdFlushBuffer:FAR INCL_KBD EQU 1 PUSH WORD KbdHandle ;Keyboard handle CALL KbdFlushBuffer Returns WORD