Types of WDM Device Objects

There are three kinds of WDM device objects:

  1. Physical Device Object (PDO) – represents a device on a bus to a bus driver.

  2. Functional Device Object (FDO) – represents a device to a function driver.

  3. Filter Device Object (filter DO) – represents a device to a filter driver.

The three kinds of device objects are all of the type DEVICE_OBJECT, but are used differently and can have different device extensions.

A driver adds itself to the stack of drivers that handle I/O for a device by creating a device object (IoCreateDevice) and attaching it to the device stack (IoAttachDeviceToDeviceStack). IoAttachDeviceToDeviceStack determines the current top of the device stack and attaches the new device object to the top of the device stack.