## Physical Device Driver Reference

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

### Dh, Eh - Remarks

The System File Number is a unique number associated with an open request. The physical device driver must perform the following actions:

Perform the requested function
Set the status WORD in the request header

Character device drivers can use Open/Close requests to correlate using their devices with application activity. For instance, the physical device driver can use the OPEN as an indicator to send an initialization string to its device. The physical device driver can then increase a reference count for every OPEN and decrease the reference count for every CLOSE. When the count goes to 0, the physical device driver can flush its buffers.

For example, to ensure that a printer is in a known state at the start of an I/O stream, this command could be used to set the font and page size. Similarly, the CLOSE call can be used to send a post-string (such as a form feed) at the end of an I/O stream. Using an IOCtl to set these pre-strings and post-strings provides a flexible mechanism of serial I/O device stream control.