Jump to content

KbdSetFgnd: Difference between revisions

From EDM2
Created page with "==Description== This call raises the priority of the foreground keyboard's thread. ==Syntax== <PRE> KbdSetFgnd ( ) </PRE> ==Parameters== rc (USHORT) - return Return c..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
==Description==
This call raises the priority of the foreground keyboard's thread.
This call raises the priority of the foreground keyboard's thread.
==Syntax==
==Syntax==
<PRE>
  KbdSetFgnd ( )
  KbdSetFgnd
 
    ( )
</PRE>


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


* 0    NO_ERROR
* 447        ERROR_KBD_KEYBOARD_BUSY
* 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.  
==Remarks==


==Example Code==
==Example Code==
Line 42: Line 37:
</PRE>
</PRE>


==Related Functions==
[[Category:Kbd]]
*
 
[[Category:The OS/2 API Project]]

Revision as of 02:48, 5 December 2016

Description

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