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.
KbdClose (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_KBD
 
USHORT KbdClose(hkbd)
HKBD hkbd;    /* keyboard handle */
 
The KbdClose function closes the specified logical keyboard. The function
removes any remaining keystrokes from the input buffer and automatically
frees the focus (if the logical keyboard has it).
 
The default keyboard cannot be closed. If you specify the default keyboard
(handle 0), the KbdClose function ignores the request.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hkbd       Identifies the logical keyboard to close. 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 the following:
 
     ERROR_KBD_INVALID_HANDLE
 
Example
 
This example opens a logical keyboard and calls KbdClose to close it:
 
HKBD hkbd;
KbdOpen(&hkbd);
    .
    .
    .
KbdClose(hkbd);
 
See Also
 
KbdFlushBuffer, KbdFreeFocus, KbdOpen