Home > Articles > Operating Systems, Server > Microsoft Windows Desktop

Programming Drivers for the Kernel Mode Driver Framework

  • Print
  • + Share This
Ron Reeves, author of Windows 7 Device Driver, showcases some of the details of creating a Kernel Mode Driver using the Kernel Mode Driver Framework.
Like this article? We recommend

Like this article? We recommend

In the previous article, we covered the overall architecture of the Kernel Mode Driver Framework. This article will drill on down into some of the details of creating a Kernel Mode Driver using the Kernel Mode Driver Framework.

The Windows Driver Framework (WDF) release includes several sample Kernel Mode Drivers. You can use sample drivers as a basis for your own drivers and refer to them for examples of specific implementation techniques. The KMDF sample drivers are installed in the Src\Kmdf subdirectory of the WDF installation directory.

This paper lists and discusses the samples in three ways: by name, by device function, and by the features that they demonstrate. We will show various listings of the sample drivers in the following sections.

Sample Drivers by Name

Table 1 lists the samples by name.

Table 1 KMDF Samples by Name

Sample Name



Virtual (1394vdev.sys) and physical (1394diag.sys) diagnostic drivers for IEEE 1394 devices that interface with the upper edge of the 1394 stack.


Sample driver for devices based on or similar to the AMCC5933 chip for PCI or ISA.


Demonstration driver that does not control any hardware. It uses a serial I/O queue to serialize read and write requests that are targeted at the device and shows how to handle request cancellation.


Driver for controller-less modem (soft modem).


Filter driver for a human interface device (HID).


Filter driver for a keyboard. It exposes a raw physical device object (PDO) for communication with user-mode application.


Driver that exposes an NDIS miniport interface at its upper edge and interacts with other drivers such as USB, IEE1394, and serial at its lower edge.


Driver that exposes a WDF interface at its upper edge and an NDIS interface at its lower edge.


Legacy, NT 4.0-style driver that does not support Plug and Play or interact with hardware. It handles four different device I/O control (IOCTL) requests and shows how to handle METHOD_NEITHER I/O. It provides kernel-level services to a user application, which dynamically loads and unloads it.


Driver for OSR USB-FX2 Learning kit. It shows how to perform bulk and isochronous data transfers to a generic USB device and how to write a bus driver.


Function driver for Intel 82557/82558-based PCI Ethernet Adapter (10/100) and Intel compatibles.


Sample function driver for devices based on the PLx PCI19056RDK-Lite Adapter, a PCI/DMA device.


RAM disk driver that shows how to create a virtual disk in memory.


WDF version of the in-box serial driver.


Function, filter, and bus drivers for a hypothetical toaster device.

  • + Share This
  • 🔖 Save To Your Account