Why is there no WDM kernel-mode driver template in Windows Driver Kit?
NickName:Alexandru Ask DateTime:2014-06-03T21:27:12

Why is there no WDM kernel-mode driver template in Windows Driver Kit?

I came across kernel-mode drivers with very little experience. Here's what I am trying to do:

  • Have a user-mode application that loads the driver.
  • Have the user-mode application write to it, in order to send it an instruction.
  • Have the driver send the RDMSR instruction to the Intel chip.
  • Return the results back to the user-mode application.

I've read this article that describes the different ways in which you can accomplish this behavior (Buffered I/O, Direct I/O, or Neither).

My problem is this...the article has code that represents the way you would structure a WDM driver, and I was expecting to be able to create a WDM KMDF project template using the Windows Driver Kit, but when I downloaded the Windows Driver Kit (WDK), the only KMDF driver template was for a WDF driver. MSDN has an article describing the differences between the two. This is kind of strange to me. I was expecting to get a template out of the box that I could modify to work like in the article I've linked, but I don't see it. Why is there no template for a WDM KMDF driver?

Just an added note, you can quite easily tell the type of the driver based on the way it creates the device (IoCreateDevice implies WDM, whereas WdfDeviceCreate implies WDF).

Copyright Notice:Content Author:「Alexandru」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/24016441/why-is-there-no-wdm-kernel-mode-driver-template-in-windows-driver-kit

More about “Why is there no WDM kernel-mode driver template in Windows Driver Kit?” related questions

Why is there no WDM kernel-mode driver template in Windows Driver Kit?

I came across kernel-mode drivers with very little experience. Here's what I am trying to do: Have a user-mode application that loads the driver. Have the user-mode application write to it, in ord...

Show Detail

Using the Windows Driver Kit (wdm.h specifically) functions in a Windows Desktop Application and/or Console Application

I have a necessity to use the ZwSetValueKey() function declared in the Wdm.h header file available as a part of the Windows Driver Kit (WDK) to access the registry keys created by a kernel mode dri...

Show Detail

What is the difference between a WDM driver, a KMDF driver and a UMDF driver?

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 ...

Show Detail

How do you calculate maximum CPU frequency from a WDM kernel-mode driver?

The problem is this: I'm trying to calculate CPU frequency within a kernel-mode WDM driver based on the IOCTL sample skeleton but it doesn't want to compile if I try to use QueryPerformanceFrequenc...

Show Detail

Is it possible to write SRIOV miniport driver using WDM?

I have a driver written using WDM(Windows Driver Model). I need to add SR-IOV support to the driver. Is it possible to write SR-IOV miniport driver using WDM or is it can be done only for WDF(Windows

Show Detail

How to set system time in a Windows WDM driver?

We are developing a GPS time sychronization hardware device. And we want write a Windows WDM driver for the device. To avoid the user level latency, we'd like set windows( XP/Vista/7) system time i...

Show Detail

Writing a windows class driver

I'm new to WDM driver development, but I have an experience developing Linux drivers. i want to develop Ethernet over USB class driver for windows XP. (CDC-ECM class driver) i know that windows o...

Show Detail

Is Google USB Driver a kernel-mode driver?

Is Google USB Driver a kernel-mode driver? Google USB Driver can be downloaded from here http://developer.android.com/sdk/win-usb.html.

Show Detail

Kernel-Mode Driver Development in Windows

I'm developing a new Kernel-Mode driver, that should run on Windows 10 (64-bit). This driver should allocate 48GB of continuous physical memory, and map it (its base address) to a virtual address...

Show Detail

How to create a basic, empty, WDM driver?

I am trying to convince Visual Studio 2013 to build a driver. But never having seen Visual Studio 2013 successfully build a driver, i have no idea how to fix the problem. So it's time to go back t...

Show Detail