Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open include file: 'ntddk.h'

I'm been trying to get into driver development (queue the "don't do that") I have been looking at this msdn page and after installing the WDK (Windows Driver Kit) 10 I am still unable to compile the example that they use on that page.

I have looked at other SO questions but I am unable to find the installed directory of the WDK. When I attempt to run the setup I am greeted by this: WDK Setup image

How can I solve this?

like image 307
Ezzy Avatar asked Mar 03 '16 16:03

Ezzy


People also ask

What is Ntddk H?

The KeGetCurrentProcessorNumberEx function (ntddk. h) returns the processor number of the logical processor that the caller is running on.

Where is Wdk installed?

The WDK Visual Studio extension is included in the default WDK installation. If you can't find driver project templates in Visual Studio, the WDK Visual Studio extension didn't install properly. To resolve this, run the WDK. vsix file from this location: C:\Program Files (x86)\Windows Kits\10\Vsix\VS2022\10.0.


1 Answers

You need to add WDK headers path to your vcxproj include directories:
vcxproj properties -> C/C++ -> General -> Additional Include Directories

C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\km\

P.S.: Make sure you install SDK 10 together with WDK 10.
P.P.S: Without SDK you will get Cannot open include file: 'ntdef.h' error

like image 141
Саша Зезюлинский Avatar answered Sep 18 '22 14:09

Саша Зезюлинский