Question

When creating a Windows Driver project in Visual Studio 2012, you have many different options to choose from.

There's a page on MSDN that helps you with choosing the correct driver model for your device. It however doesn't clearly explain the exact differences between the WDM, KMDF and UMDF driver types, and when to choose which model.

I'm looking for an explanation on the differences between the WDM, KMDF and UMDF driver models, so it's easy for beginning Windows driver developers to choose the correct model.

Was it helpful?

Solution

In a nutshell:

  • WDM stands for Windows Driver Model. Every Kernel driver is essentially a WDM driver.
  • KMDF stands for Kernel Mode Driver Framework. This is a framework that encapsulates and hides many of the OS programming aspects that driver developer must relate to even if it has nothing to do with the business logic of his driver. Some functionality doesn't exist in KMDF framework and will require native Kernel calls without using the framework (but in most situations it's not the case).
  • UMDF stands for User Mode Driver Framework. It's a complementary framework to KMDF and together they comprise WDF (Windows Driver Frameworks). UMDF allows to create a driver in user mode, having all the benefits of User mode programming vs Kernel mode. Naturally, UMDF driver have limitations compared to KMDF/WDM drivers and in most situations it will require a Kernel counterpart with at least some functionality.

The page you've referenced is pretty comprehensive. You should dwell into it for deeper understanding.

OTHER TIPS

I like articel from MSDN : Differences Between WDM and KMDF

  • WDM is the driver model since pnp device drivers (>=Win2k). In this model you have to handle functions not relevant to your functionality. Walter Oney (Programming the Microsoft Windows Driver Model) outsourced such functions to external device driver libraries for reusing.

  • WDF/kmdf tries to simplify the development of device drivers. Functions can be overwritten or default handler is used. The administration of memory and queues has been greatly simplified and secured.

  • UMDF tried to use similar function calls in user mode as function calls in kernel mode.

Hopefully not too late. Question date first seen when I had finished writing!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top