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.
KbdSynch (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_KBD
 
USHORT KbdSynch(fWait)
USHORT fWait;    /* wait/no-wait flag */
 
The KbdSynch function synchronizes access to the keyboard device driver.
 
This function should be used by a Kbd subsystem, not by an application. You
cannot replace the KbdSynch function by using the KbdRegister function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
fWait      Specifies whether to wait for access to the keyboard router if
           access is not available. If this parameter is IO_WAIT, the
           function waits for access to the keyboard router. If the
           parameter is IO_NOWAIT, the function does not wait and returns
           immediately.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value.
 
Comments
 
The KbdSynch function requests an exclusive system semaphore that blocks all
other threads within a screen group until the semaphore is cleared. This
semaphore is cleared when a called Kbd function returns.
 
See Also
 
DosDevIOCtl, KbdRegister