Jump to content

KbdSetFgnd

From EDM2
Revision as of 04:14, 16 September 2017 by Martini (talk | contribs)
Legacy Function Warning
It is recommended to use a newer replacement for this function.
Replacement:
Remarks: This page list the older version of the function for reference.

This call raises the priority of the foreground keyboard's thread.

Syntax

KbdSetFgnd ( )

Parameters

rc (USHORT) - return

Return code descriptions are:

  • 0 NO_ERROR
  • 447 ERROR_KBD_KEYBOARD_BUSY
  • 504 ERROR_KBD_EXTENDED_SG

Return Code

KbdSetFgnd marks the current process that owns the keyboard. Threads in this process receive a priority boost. The previous foreground keyboard threads lose their priority boost.

This function should only be issued by a Keyboard Subsystem during KbdCharIn or KbdStringIn processing.

Example Code

C Binding

#define INCL_KBD

USHORT  rc = KbdSetFgnd(VOID);

USHORT           rc;            /* return code */

MASM Binding

EXTRN  KbdSetFgnd:FAR
INCL_KBD            EQU 1

CALL   KbdSetFgnd

Returns WORD