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

Description

1394

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

AMCC5933

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

Echo

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.

FakeModem

Driver for controller-less modem (soft modem).

Firefly

Filter driver for a human interface device (HID).

Kbfiltr

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

NdisEdge

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.

NdisProt

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

Nonpnp

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.

OsrUsbFx2

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.