## Physical Device Driver Reference

[prev][next][parent][TOC]

### Providing Monitor Support in a Character Device Driver

Character device drivers provide support for character device monitors by using the Monitor Dispatcher Device Helper services to:

1.Create monitor chains for their data streams (MonitorCreate)
2.Register monitors with monitor chains (Register)
3.Send data to their monitors (MonWrite)
4.Flush all data from their monitors (MonFlush)
5.Remove monitors from monitor chains (DeRegister)

Character device drivers use the Monitor Dispatcher Device Helper services to manage the monitor chains associated with their data streams, and to move data between various monitors in their monitor chains. The Monitor Dispatcher Device Helper services are part of the OS/2 monitor dispatcher. The AX register is used to return errors. The Carry flag is clear if no errors are returned and is set if an error is returned. See Device Helper (DevHlp) Services for descriptions of the individual Device Helper services .

Each OS/2 Monitor Dispatcher Device Helper service uses the OS/2 System Trace Facility. Entry and exit parameters are traced when tracing is enabled for monitors. This facility provides assistance for the character device driver developer during the debugging phase of the development of a physical device driver. See the OS/2 Control Program Programming Reference for a description of the System Trace Facility.