[Toc][Index]

DosMonClose


Bindings:  C, MASM 

This call terminates character device monitoring.  All monitor buffers 
associated with this process are flushed and closed. 
 DosMonClose     (Handle) 
 
 Handle (HMONITOR) - input 
    Device handle returned from a previous DosMonOpen call. 
 rc (USHORT) - return 
    Return code descriptions are: 
    0         NO_ERROR 
    381       ERROR_MON_INVALID_HANDLE 
 
 Remarks 
 A single process may register one or more monitors with a character 
 device using the same device handle returned from a previous DosMonOpen 
 call.  When DosMonClose is issued for a specific, opened device handle, 
 all monitors for the current process registered with this handle 
 terminate. 
 When DosMonClose is issued, the monitor loses access to the device data 
 stream. Before issuing DosMonClose, monitor threads calling  DosMonRead 
 and DosMonWrite should be terminated.  After DosMonClose has been called: 
 
 o DosMonRead calls return an ERROR_MON_BUFFER_EMPTY return code. 
 o DosMonWrite calls return an ERROR_NOT_ENOUGH_MEMORY return code. 
 
 Data segments containing monitor buffers should not be freed until after 
 DosMonClose is called.  If data segments containing monitor buffers are 
 freed before DosMonClose is called, a GP fault occurs when  DosMonClose 
 is called and the process is terminated. 
 For a detailed description of this call see the chapter "Character Device 
 Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And 
 Device Support Volume 1. 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs