1.4 Device-type-specific I/O Requests
The remaining chapters in this part of the manual summarize the device-type-specific I/O requests handled by the system drivers of the most common kinds of devices.
Any new kernel-mode driver must handle the same set of I/O requests as a system-supplied driver if the new driver meets any of the following conditions:
·The new driver will replace a system driver for the same type of device.
·The new driver is for another device of a type already in the system.
·The new driver is an intermediate driver to be layered between two system drivers.
Such a new driver must handle every IRP_MJ_XXX that the system-supplied driver(s) handle. In most cases, a new device driver should also handle the same set of IOCTL_XXX for IRP_MJ_DEVICE_CONTROL requests, even if the new driver must emulate the behavior of the corresponding system-supplied driver. Otherwise, the new driver might “break” user-mode applications that expect these kinds of requests to be honored.
The remaining chapters in this part of the manual also supply tips about the NTSTATUS values that drivers can set in the I/O status block of IRPs, set as necessary in an error log packet, and return for specific requests. These tips for selecting request-specific NTSTATUS values do not include STATUS_PENDING, which any driver can return for an IRP it has not yet completed. Use this information to decide on the appropriate status values to be returned by new drivers for similar types of devices, or as an aide in determining the appropriate status values to be returned by the driver for a new type of device.
For more information about the following kinds of drivers and the requests that each is required to support, see the following:
·Keyboard and mouse drivers in Chapter 2
·Beep device drivers in Chapter 3
·Parallel and serial drivers in Chapter 4
·Multimedia sound, wave, midi, aux, and mixer drivers in Chapter 5
·Disk and floppy drivers in Chapter 6
·CD-ROM drivers in Chapter 7
·Tape drivers in Chapter 8
·SCSI drivers in Chapter 9
·Video miniport drivers in the Graphics Driver Reference