Jump to content

DevHelp_SendEvent

From EDM2
Revision as of 17:36, 2 January 2020 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 );