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

Programming Drivers for the UMDF

  • Print
  • + Share This
Previous articles by Ron Reeves, author of Windows 7 Device Driver, looked at Device Driver Objects, Windows Driver Framework, overall architecture of UMDF and major activities and programming approach. This article looks at programming a sample device driver.
Like this article? We recommend

Like this article? We recommend

In the previous article “Programming Approach UMDF Windows 7 Device Drivers,” we looked at the programming approach for developing Windows 7 UMDF Drivers. In this article, we want to look at programming drivers for the UMDF. We will use one of the sample drivers, the Skeleton driver, supplied with the Windows Driver Kit (WDK). As we mentioned in the last article, the UMDF release includes several sample UMDF drivers, one of which is the Skeleton Driver. The Windows Driver Kit has the sample drivers installed at WDF\UMDF\src in the Windows Driver Kit installation directory.

The Skeleton Driver

The Skeleton driver contains the minimum amount of code that is required in a loadable UMDF driver. It was designed as starting point from which to build drivers for actual hardware. In addition to demonstrating the minimal required features and best practices, the Skeleton driver splits into appropriate modules the common code that is required in all UMDF drivers.

The Skeleton driver supports a driver entry point, functions to create and initialize the driver and device callback objects, and functions for COM support. It does not support any I/O or Plug and Play operations. Table 1 lists the component source files.

Table 1—Component Source Files for the Skeleton Driver




Source code for the CUnknown and CClassFactory classes.


Header file for COM support functions and classes.


Source code for the device callback object class CMyDevice.


Header file for the device callback object.


Source code for the driver entry point and exported COM support functions.


Source code for the driver callback object class CMyDriver.


Header file for the driver callback object.


Definition file that identifies the library name and exported entry point for driver.


Header file for local type definitions.


Generic makefile for building the sample.


Additional commands input to the makefile.


Help file that describes the sample.


Resource file for the sample.


Source file for the build procedure.


INF that installs the Skeleton sample as a driver for the OSR USBFX2 device.


INF that installs the Skeleton sample as a driver for the OSR USBFX2 device on Windows 7.


INF that installs the Skeleton sample as a driver for a root-enumerated device.


INF that installs the Skeleton sample as a driver for a root-enumerated device on Windows 7.

  • + Share This
  • 🔖 Save To Your Account