Questions tagged [kmdf]

A KMDF driver is the software installed on the computer that communicates with the hardware to make the device function.

The Kernel-Mode Driver Framework (KMDF) is a driver framework developed by Microsoft as a tool to aid driver developers create and maintain kernel mode device drivers for Windows 2000 and later releases. Together with the User-Mode Driver Framework () it makes up the Windows Driver Frameworks ().

200 questions
22
votes
2 answers

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 device. It however doesn't clearly explain the exact…
lesderid
  • 3,388
  • 8
  • 39
  • 65
20
votes
2 answers

Raw PDO to send IOCTL to upper filter driver (kbfiltr/moufiltr) to enable/disable device

I am quite new to driver development and trying to write a simple filter driver that will enable or disable a keyboard or mouse device. If I can make it work, I want to use it to disable the touchpad on my laptop when a mouse is plugged in. I…
Dale
  • 12,884
  • 8
  • 53
  • 83
19
votes
1 answer

On x86, when the OS disables interrupts, do they vanish, or do they queue and 'wait' for interrupts to come back on?

My platform is x86 and x86-64, on Windows. The point of the interrupt priority system is to have the highest priority interrupt beat out the others. To enforce this, I'm guessing that Windows will disable all interrupts of lower level completely,…
VoidStar
  • 5,241
  • 1
  • 31
  • 45
15
votes
5 answers

Differences between struct in C and C++

I am trying to convert a C++ struct to C but keep getting "undeclared identifier"? Does C++ have a different syntax for referring to structs? struct KEY_STATE { bool kSHIFT; //if the shift key is pressed bool kCAPSLOCK; //if the caps lock…
Dale
  • 12,884
  • 8
  • 53
  • 83
11
votes
5 answers

Automating Win32 Driver Testing

Does anyone know ways of partially or fully automating driver test installation? I am new to driver development and am used to more of a test-driven approach in higher level languages, so moving to the kind of environment where I can't easily test…
Dale
  • 12,884
  • 8
  • 53
  • 83
10
votes
1 answer

AcquireCredentialsHandle fails in kernel mode, when using SCH_CRED_FORMAT_CERT_HASH

I call AcquireCredentialsHandle in a kernel driver, passing in SCHANNEL_CRED with the dwCredFormat set to SCH_CRED_FORMAT_CERT_HASH. It fails with SEC_E_NO_CREDENTIALS. Here is my code: BYTE certHashBytes[20] = {…
wezten
  • 2,126
  • 3
  • 25
  • 48
6
votes
4 answers

How to solve LNK2019 unresolved external symbol DriverEntry referenced in function GsDriverEntry?

While I was compiling this project https://github.com/namazso/hdd_serial_spoofer I got the error message above ,how can I solve this ? I'm using vs 2017 and wdk 10 . (Must compile in release ,debug mode is not supported .There is no DriverEntry…
iouvxz
  • 89
  • 9
  • 27
6
votes
1 answer

Visual Studio can not start debug session when debuging kernel driver

When I try to debug my KMDF driver from Visual Studio 2013, I get following error Windows Debugging Extension for Visual Studio Could not start debug session, error 8004005: Unspecified error Before I get the error, it do install the driver on…
magol
  • 6,135
  • 17
  • 65
  • 120
6
votes
1 answer

Sending IOCTL from IRQL=DISPATCH_LEVEL (KbFilter/KMDF)

I am using the KbFilter example in the WDK, trying to send an IOCTL in a function that is called by KbFilter_ServiceCallback and therefore is executed at DISPATCH_LEVEL. The function just has to send an IOCTL and return, am not waiting for an output…
Dale
  • 12,884
  • 8
  • 53
  • 83
5
votes
1 answer

Opening WDK Projects results in "One or more errors occurred" message

I'm trying to make a Windows kernel driver, but every time I either try to make a new project with KMDF template or open an example driver by Microsoft (like keyboard filter), it doesn't work. In the case of loading an existing driver project, it…
Accumulator
  • 873
  • 1
  • 13
  • 34
5
votes
0 answers

Windows SDK Version was not found

On my Windows 7 machine, I have both the Windows SDK(10.0.14393.795) and WDK(10.0.14393.0) versions, yet, when I am building our project in Visual Studio 2015, it keeps on saying that MSB8036 The Windows SDK version 10.0.14393.0 was not found.…
Swindles
  • 61
  • 2
5
votes
0 answers

Is there a way to intercept every single IRP in KMDF

I am writing a KMDF driver that needs to intercept every IRP before it passes to the ioQueue. I have a callback function registered PreprocessIrpCallback and want to hook it into the framework like this status =…
Thomas Kejser
  • 1,264
  • 1
  • 10
  • 30
4
votes
1 answer

What does DebugView's "Enable Verbose Kernel Output" do?

I've followed Microsoft's "Write a Hello World Windows Driver (KMDF)" and wasn't sure how to see the output on WinDbg. After trying to set the Debug Print Filter registry to 0xFFFFFFFF, rebooting and other rain dance solutions, the one thing that…
L4mbo
  • 43
  • 4
4
votes
1 answer

Visual Studio How to use C++ standard library in a kernel mode driver project?

I'm using vs2015 and wdk10, I can use random in an empty project . #include std::default_random_engine eng;//works fine . But when I create an empty kernel mode driver project ,I can't use random in it. #include…
iouvxz
  • 89
  • 9
  • 27
4
votes
1 answer

Windows Virtual HID Framework VhfCreate method returning STATUS_INVALID_DEVICE_REQUEST

I'm working on creating a virtual HID device in Windows 10. I'm trying to use the Windows Virtual HID Framework (as described here: https://msdn.microsoft.com/en-us/library/windows/hardware/dn925056(v=vs.85).aspx) to build the driver. At my current…
bacowan
  • 165
  • 2
  • 12
1
2 3
13 14