## Physical Device Driver Reference

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

### Error Handling

The developer of a character device monitor must not disregard error returns from monitor functions and assume that good data is automatically received. A character device monitor must handle errors returned from all monitor function calls. Failure to do so can severely and permanently affect the data stream. For example, a monitor thread that ignores an error returned on a call to DosMonRead might attempt to call DosMonWrite with whatever data that is currently residing in the monitor's private data area. This data might be meaningful (that is, it might be the good data returned from the last call to DosMonRead). This data might not be meaningful but might be the result of some other internal processing by the application. In either case, data unexpected by the physical device driver might be returned to the data stream.