Jump to content

KbdSetFgnd: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
m which replacement function? bad joke
 
Line 1: Line 1:
{{Legacy
|RepFunc=
|Remarks=This page list the older version of the function for reference.
}}
This call raises the priority of the foreground keyboard's thread.
This call raises the priority of the foreground keyboard's thread.


==Syntax==
==Syntax==
  KbdSetFgnd ( )
  KbdSetFgnd ()


==Parameters==
==Parameters==
rc (USHORT) - return
;rc (USHORT) - return:Return code descriptions are:
Return code descriptions are:
* 0   NO_ERROR
* 0   NO_ERROR
*447 ERROR_KBD_KEYBOARD_BUSY
* 447 ERROR_KBD_KEYBOARD_BUSY  
*504 ERROR_KBD_EXTENDED_SG
* 504 ERROR_KBD_EXTENDED_SG


==Return Code==
==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.
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.  
This function should only be issued by a Keyboard Subsystem during [[KbdCharIn]] or [[KbdStringIn]] processing.


==Example Code==
==Bindings==
=== C Binding===
=== C ===
<PRE>
<PRE>
#define INCL_KBD
#define INCL_KBD
Line 27: Line 22:
USHORT  rc = KbdSetFgnd(VOID);
USHORT  rc = KbdSetFgnd(VOID);


USHORT           rc;            /* return code */
USHORT rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  KbdSetFgnd:FAR
EXTRN  KbdSetFgnd:FAR

Latest revision as of 16:34, 3 January 2019

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.

Bindings

C

#define INCL_KBD

USHORT  rc = KbdSetFgnd(VOID);

USHORT  rc;            /* return code */

MASM

EXTRN  KbdSetFgnd:FAR
INCL_KBD            EQU 1

CALL   KbdSetFgnd

Returns WORD