DevHelp MonFlush

This service removes all data from a specified monitor chain, such as the data stream.

C
 USHORT APIENTRY DevHelp_MonFlush( USHORT MonitorHandle) 

Assembler
 MOV  AX,monitor_handle       ; MonitorCreate handle for chain MOV  DL,DevHlp_MonFlush

CALL [Device_Help] 

C

 * MonitorHandle (USHORT) : MonitorCreate handle for chain.

Assembler
 MOV  AX,monitor_handle       ; MonitorCreate handle for chain MOV  DL,DevHlp_MonFlush 

C
Success Indicator: Clear if successful.

Possible errors ERROR_MON_INVALID_HANDLE (381) ERROR_MON_INVALID_PARMS  (379)

Assembler
 'C' Clear if successful. AX = 0.

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

Remarks
This service can be called at task time in the OS/2 mode only. When a physical device driver calls MonFlush, the OS/2 Monitor Dispatcher creates and places a flush record into the monitor chain. The general format of monitor records requires that every record contain a flag WORD as the first entry. One of the flags indicates that this record is a flush record. The flush record consists only of the flag WORD. This record is used by monitors along the chain to reset internal state information and to assure that all internal buffers are flushed. The flush record must be passed along to the next monitor because the monitor dispatcher will not process any more information until the flush record is received at the end of the monitor chain; that is, it is returned to the physical device driver's monitor chain buffer at the end of the monitor chain.

Note: Subsequent MonWrite requests fail (or block) until the flush completes (that is, until the flush record is returned to the device driver's monitor chain buffer).

The state of the interrupt flag is not preserved across calls to this DevHlp service.

C

 * 1) include "dhcalls.h"

USHORT APIENTRY DevHelp_MonFlush( USHORT MonitorHandle) 