Writing Layered Drivers

Layered drivers are the most general type of intermediate driver. They depend on a well-defined inter-driver calling mechanism provided by the I/O Manager. The following three sections explain how this mechanism works and what a driver needs to do if it wants to use another driver as a component.

How Layered Drivers Work

As shown in Figure 15.1, a layered driver may expose one or more named Device objects to which clients send I/O requests. When an IRP representing one of these requests arrives, the layered driver can proceed in two different ways.

  • Send the IRP directly to a lower-level driver.

  • Hold the IRP in a pending state while it allocates additional IRPs and sends them to one or more lower-level drivers.

If the ...

Get Windows® 2000 Device Driver Book: A Guide for Programmers, Second Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.