Search code examples
cwindowsvisual-studiodriverwindows-kernel

How can I start making kernel Windows drivers?


I am trying to figure out how to make drivers for windows 10 in C. But now I have redownloaded everything 10+ times with out any luck. I first visited this site and downloaded visual studio 2022 ( https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk ). Inside the installer I went to individual components and downloaded all 8 tools / libs. I then preceded to download the SDK followed up by the WDK (all newest versions). After each failure I made sure to go into programs (under control panel) and uninstall everything. I then deleted the contents out of the folders for both the cache and visual studio followed up by then deleting my visual studio content out of my user folder. Did I miss anything to correctly uninstall?

This results in me being able to create a Kernel Mode Driver, Empty (KMDF) project however I was unable to include "ntifs.h" which is a driver library. I then ran into a second issue which was that going into my Drivers properties does not yield the In2Cat and the Linker (trying to access its command line) tab inside of Configuration Properties. enter image description here

Anyways because of this I started asking for help and someone notified me that the newest versions does not work correctly so I tried to download older versions. However, doing so results in SDK compatibility issues which causes no default templates to pop up when trying to create a new project in Visual Studio (when I used the newest versions of everything I got tons of options here). enter image description here

Having said all of that I really would like to know which Visual Studio, SDK, and WDK I should download to have access to the linker, empty kernel driver template, and to correctly be able to include things such as "ntifs.h" in my C files. The following link will provide you all older versions and I need to know which ones to choose here ( https://learn.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads?source=recommendations ).

I was also told that downloading the Windows 11 version is ok even though I am on Windows 10 and attempting to make a Windows 10 driver. But having said that I found that the older SDK's and WDK's versions don't match up and trying a new combinations takes at least 30 min due to the constant uninstalling and reinstalling. I would be extremely grateful if anyone could help me out!!


Solution

  • https://learn.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads

    1. Install Visual Studio 2019, ensure Desktop development with C++ workload is selected
    2. Install WDK for Windows 10, version 2004