Jump to content

DevHelp SendEvent: Difference between revisions

From EDM2
Created page with "This service is called by a physical device driver to indicate the occurrence of an event. ==Syntax== ===C=== <PRE> USHORT APIENTRY DevHelp_SendEvent( USHORT EventType, ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This service is called by a physical device driver to indicate the occurrence of an event.  
{{DISPLAYTITLE:DevHelp_SendEvent}}
This service is called by a physical device driver to indicate the occurrence of an event.


==Syntax==
==Syntax==
===C===
===C===
<PRE>
USHORT APIENTRY DevHelp_SendEvent( USHORT EventType,
USHORT APIENTRY DevHelp_SendEvent( USHORT EventType,
                                   USHORT Parm );
                                   USHORT Parm );
</PRE>


===Assembler===
===Assembler===
Line 19: Line 18:
==Parameters==
==Parameters==
===C===
===C===
; EventType (USHORT): Event number being signalled.
;EventType (USHORT): Event number being signalled.
 
;Parm (USHORT): The argument for the event being signalled.
; Parm (USHORT): The argument for the event being signalled.


===Assembler===
===Assembler===
Line 45: Line 43:
==Remarks==
==Remarks==
The events are defined in the following manner:
The events are defined in the following manner:
 
{|class="wikitable"
{|class="wikitable sortable"
!Key||Event||Argument
!Key ||Event ||Comments||Argument
|-
|-
|Session manager hot key from the mouse: || 0. Reserved.||2-byte time stamp, here the high-order byte is seconds, and the low-order byte is hundredths of seconds.  
|Session manager hot key from the mouse: || 0. Reserved.||2-byte time stamp, here the high-order byte is seconds, and the low-order byte is hundredths of seconds.
|-
|-
|Ctrl+Break || 1 || 0.  Reserved.
|Ctrl+Break||1||0.  Reserved.
|-
|-
|Ctrl+C:   ||2   || 0.  Reserved.
|Ctrl+C:||2||0.  Reserved.
|-
|-
|Ctrl+NumLock:   || 3 || Foreground session number.
|Ctrl+NumLock:||3||Foreground session number.
|-
|-
|Ctrl+PrtSc:   || 4 || 0.  Reserved.  
|Ctrl+PrtSc:||4||0.  Reserved.
|-
|-
|Shift+PrtSc:   || 5   || 0.  Reserved.  
|Shift+PrtSc:||5||0.  Reserved.
|-
|-
|Session Manager hot key from the keyboard: || 6   || Hot Key ID. The physical keyboard device driver uses the Hot Key ID, which is set through the use of the IOCtl "Set Session Manager Hot Key" (Function 56h), which can be found in the OS/2 Physical Device Driver Reference.
|Session Manager hot key from the keyboard:||6||Hot Key ID. The physical keyboard device driver uses the Hot Key ID, which is set through the use of the IOCtl "Set Session Manager Hot Key" (Function 56h), which can be found in the OS/2 Physical Device Driver Reference.
|-
|Reboot key sequence from the keyboard: || 7  ||  0.  Reserved.
|-
|-
|Reboot key sequence from the keyboard:||7||0.  Reserved.
|}
|}


Line 75: Line 71:
                                   USHORT Parm );
                                   USHORT Parm );
</PRE>
</PRE>
==Related Functions==


[[Category:DevHlps]]
[[Category:DevHlps]]

Latest revision as of 17:36, 2 January 2020

This service is called by a physical device driver to indicate the occurrence of an event.

Syntax

C

USHORT APIENTRY DevHelp_SendEvent( USHORT EventType,
                                  USHORT Parm );

Assembler

MOV   AH,event                ; Event being signalled
MOV   BX,argument             ; Parameter for the event being signalled
MOV   DL,DevHlp_SendEvent

CALL  [Device_Help]

Parameters

C

EventType (USHORT)
Event number being signalled.
Parm (USHORT)
The argument for the event being signalled.

Assembler

MOV   AH,event                ; Event being signalled
MOV   BX,argument             ; Parameter for the event being signalled

Return Code

C

Success Indicator: Clear if successful.

Possible errors: Carry flag set if error sending signal.

Assembler

'C' Clear if successful.

'C' Set if error sending signal.

Remarks

The events are defined in the following manner:

Key Event Argument
Session manager hot key from the mouse: 0. Reserved. 2-byte time stamp, here the high-order byte is seconds, and the low-order byte is hundredths of seconds.
Ctrl+Break 1 0. Reserved.
Ctrl+C: 2 0. Reserved.
Ctrl+NumLock: 3 Foreground session number.
Ctrl+PrtSc: 4 0. Reserved.
Shift+PrtSc: 5 0. Reserved.
Session Manager hot key from the keyboard: 6 Hot Key ID. The physical keyboard device driver uses the Hot Key ID, which is set through the use of the IOCtl "Set Session Manager Hot Key" (Function 56h), which can be found in the OS/2 Physical Device Driver Reference.
Reboot key sequence from the keyboard: 7 0. Reserved.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_SendEvent( USHORT EventType,
                                   USHORT Parm );