Steps in Porting

Depending on the type of driver, porting involves performing the following steps:

  1. Port the DriverEntry routine and add code to create the WDFDRIVER object.
  2. Port the AddDevice routine to an EvtDriverDeviceAdd callback, and add code to create the WDFDEVICE objects.
  3. Add support for interrupts if the driver supports interrupt handling.

At this point, you can perform the remaining steps incrementally and in any order, testing and debugging after each addition. For example, you can start by implementing the I/O queues and using the framework defaults for Plug and Play and power management. After you have debugged the basic I/O support, you can add support for more extensive Plug and Play and power management requests. The remaining steps are as follows:

† This functionality is only available to Kernel-Mode Driver Framework (KMDF) drivers.

Except as noted, the information in this section applies to all types of drivers (PDO, FDO, and filter DO). However, if you are porting a bus driver (PDO) to KMDF, you will also need to port the device enumeration code. For information about enumerating devices, see Enumerating the Devices on a Bus.

For reference information describing the ways that the various WDF objects, methods, and event callback functions map to common WDM objects and functions, see Summary of KMDF and WDM Equivalents.