## Physical Device Driver Reference

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

### Monitor Data Records

Only one monitor data record at a time can be taken from a data stream by a call to DosMonRead, or returned to the data stream by a call to DosMonWrite . A monitor data record is constructed by the physical device driver, and consists of a flag WORD, which can be followed by actual device data. Monitor data records are variable length. Some consist solely of a flag WORD, while some consist of a flag WORD followed by actual device data of differing lengths. To be consistent with the minimum buffer size defined for a monitor chain, the maximum length of a monitor data record passing through a monitor chain is the length of the device driver's monitor chain buffer minus 2 bytes. An application cannot return to the data stream a data record larger than this.

The physical device driver uses flags within the flag WORD to indicate the type of data that is part of this data record, and the action it expects its monitor to take on receiving this data record. Physical device drivers can have specific requirements for the return of data records to the data stream. Therefore, monitors should not indiscriminately consume data records from the data stream.