Developing Drivers with the Windows Driver Foundation (Pro Developer)

Although the frameworks include a number of features that support the specific requirements of UMDF or KMDF drivers, most of the core WDF features are shared by both frameworks:

A core principle of WDF is that most driver code should be devoted to managing the device, not handling routine interactions with the system such as tracking Plug and Play and power state. WDF provides an abstraction layer between the driver and Windows so that drivers interact with the frameworks for most services. This model allows WDF to provide intelligent, thoroughly tested defaults for common operations. A WDF driver opts in to override WDF defaults, as required by its device, and then allows the frameworks to handle the remaining operations. Developers are not required to implement large amounts of "boilerplate" code just to get a driver to successfully install and load.

The framework mediates interactions between a WDF driver and other drivers, and between the WDF driver and Windows. A WDF driver interacts with Windows or another driver through the various framework objects, which are used for purposes such as working with I/O requests, managing I/O flow, synchronization, memory buffers, and accessing hardware resources such as device registers or interrupts.

In addition to supporting features that all categories of devices use, WDF supports extensions for particular device categories to support features that are specific to those types of devices. For example, both UMDF and KMDF provide extensions for communicating with USB devices. As new features are added to Windows and as new categories of devices are supported, features that are common to all supported device categories will be added to the frameworks' DDI.

The following two sections discuss features that are specific to UMDF or KMDF.

Категории