Which Drivers Can Be Ported and Where
This topic describes which WDM drivers can be ported to Windows Driver Frameworks (WDF), and how to decide whether to port to Kernel-Mode Driver Framework (KMDF) or User-Mode Driver Framework (UMDF).
Whether a particular driver can be ported to WDF depends on the following criteria:
- The operating system versions on which the driver runs
- The type of device that the driver supports
- The driver model that the driver uses
In general, you can use KMDF or UMDF to write drivers that conform to WDM, supply entry points for the major I/O dispatch routines, and handle IRPs.
For some device types, system-supplied device class and port drivers provide driver dispatch functions and call a vendor-supplied miniport driver to handle specific I/O details. These miniport drivers are essentially callback libraries and are not supported by WDF. In addition, WDF does not support device types that use Windows Image Acquisition (WIA).
You can use KMDF to create drivers that run on Windows 2000 and later. You can use UMDF version 1 to write drivers that run on Windows XP and later, and UMDF version 2 to target Windows 8.1.
For information about device and driver types that UMDF and KMDF support, see Choosing a Driver Model.
UMDF version 2.0 contains a significant subset of KMDF functionality. If your driver does not require any KMDF-only functionality, you can write a mode-agnostic driver. A mode-agnostic driver is one that can be compiled using either KMDF or UMDF. For a list of KMDF-only functionality, see Comparing UMDF 2.0 Functionality to KMDF.
If you are writing a mode-agnostic driver, consider using the _KERNEL_MODE preprocessor macro to compile the driver conditionally. For examples, see How to convert a KMDF driver to a UMDF 2.0 driver (and vice-versa).
For details regarding the differences between UMDF versions 1 and 2, see Getting Started with UMDF.