Jump to content

DevHelp DeRegister: Difference between revisions

From EDM2
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 20: Line 20:
==Parameters==
==Parameters==
===C===
===C===
; MonitorPID (USHORT) :  Process ID of monitor task
; ''MonitorPID'' ([[USHORT]]) - input :  Process ID of monitor task


; MonitorHandle (USHORT) : MonitorCreate handle for chain
; ''MonitorHandle'' (USHORT) - input : MonitorCreate handle for chain


; Monitorsleft (PUSHORT) : Number of monitors still registered in the chain, after deregistration.
; ''Monitorsleft'' (PUSHORT) - input : Number of monitors still registered in the chain, after deregistration.


===Assembler===
===Assembler===
Line 67: Line 67:
                                     PUSHORT MonitorsLeft)
                                     PUSHORT MonitorsLeft)
</PRE>
</PRE>
==Related Functions==


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

Latest revision as of 18:14, 23 May 2025

This service removes all of the monitors associated with the specified task from the specified monitor chain.

Syntax

C

USHORT APIENTRY DevHelp_DeRegister (USHORT  MonitorPID,
                                    USHORT  MonitorHandle,
                                    PUSHORT MonitorsLeft)

Assembler

MOV   BX,monitor_PID          ; Process ID of monitor task
MOV   AX,monitor_handle       ; MonitorCreate handle for chain
MOV   DL,DevHlp_DeRegister

CALL  [Device_Help]

Parameters

C

MonitorPID (USHORT) - input
Process ID of monitor task
MonitorHandle (USHORT) - input
MonitorCreate handle for chain
Monitorsleft (PUSHORT) - input
Number of monitors still registered in the chain, after deregistration.

Assembler

MOV   BX,monitor_PID          ; Process ID of monitor task
MOV   AX,monitor_handle       ; MonitorCreate handle for chain
MOV   DL,DevHlp_DeRegister

CALL  [Device_Help]

Return Code

C

Success Indicator: 0

Possible errors:

  • ERROR_MON_INVALID_HANDLE (381)
  • ERROR_MON_INVALID_PARMS (379)

Assembler

   'C' Clear if successful.
       AX = The number of monitors still registered in the chain, after deregistration.

   'C' Set if error.
       AX = Error code.
            Possible errors:
               ERROR_MON_INVALID_HANDLE         (381)
               ERROR_MON_INVALID_PARMS          (379)

Remarks

This function can be called only at task time in OS/2 mode. To remove a monitor from a monitor chain, the physical device driver must supply the Process ID (PID) of the process that owns the monitor being removed and the handle of the monitor chain that is affected. All monitors belonging to the specified PID are removed from the specified monitor chain. A single process can register more than one monitor with the same monitor chain. Therefore, DeRegister removes all monitors associated with the specified process from the specified monitor chain.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_DeRegister (USHORT  MonitorPID,
                                    USHORT  MonitorHandle,
                                    PUSHORT MonitorsLeft)