2

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

  • _Side note:_ Linux, anyone? Windows has a long history of producing _multiple_ [and _incompatible_] driver SDKs. When I last checked, circa 2010, there were at least five and the latest two were `WDM` and `WDK`. I'm not surprised that they can't seem to get it right [once] and have a stable API for drivers. I'm even more surprised that `WDK` is now version dependent. Or, that you can't use the latest visual studio version and just install an older `WDK` version. – Craig Estey Oct 25 '22 at 01:25
  • The conservative approach is install the older Win10/VS and the Win10/WDK, despite doc that says that the latest Win11/VS can be used with Win10/WDK. I assume you tried the former and hit a bunch of incompatibilites. Because of backward compatibility for _apps_, Win10/VS _will_ probably install on Win11. Then, install Win10/WDK. Test that. If that works, you could stop there and enjoy. It _would_ be nice to use the latest Win11/VS because I presume there's more bug fixes, so you could then do: Win11/VS and Win10/WDK [again] and fall back to Win10/VS and Win10/WDK [which you already know works] – Craig Estey Oct 25 '22 at 01:31
  • @CraigEstey Do you have any suggestions about which SDK and WDK I should install? I am thinking that using the older versions is the way to go for now. I can download Visual Studio 2019 but there's only two older windows 10 SDK's while theres numerous WDK's (check the link). Do you have any thoughts which ones I should use together? At this point I don't care which version or how old it is as long as it works because this is killing me. I know some version has to work though I just cant seem to figure out which one it is. – IDontWantToMakeAnotherAccount Oct 25 '22 at 02:02
  • I agree: _older versions is the way to go for now._ At a given [release] time, the current versions are tested together [i.e. the "new shiny" must work ;-)]. Newer VS _should_ get tested against any/all older WDK. But, that's a lot of work [for MS]. So, Win11/VS _might_ work with Win10/WDK [and, again, _should_ if MS did proper testing]. But, the safer fallback is: Win10/VS (VS 2017), Win10/SDK, and Win10/WDK (you need _three_?!?!). I can't guess. There are also "versions" such as, 2004 1903, 1809, ..., 1607. I'd match up the SDK and WDK versions to start. – Craig Estey Oct 25 '22 at 03:07
  • I'd use Win10/SDK version 1703. There is a Win10/WDK version 1703. So, I'd try that. If that works, you could try a later Win10/WDK version (e.g. version 2004). But, AFAICT, the baseline would be: Win10/VS 2017, Win10/SDK version 1703, Win10/WDK version 1703. – Craig Estey Oct 25 '22 at 03:11
  • But, I _just_ noticed: Under the VS section, it says if we're targeting Win10/version 1703, we want: "VS Studio Express 2015 for Desktop". Gag! I'd forgotten how much they suck! Honestly, I'm just taking an educated guess here based on the "older" WDK page and what it says. Hopefully, someone who actually uses this stuff will see this question and post an informed answer. – Craig Estey Oct 25 '22 at 03:22
  • @CraigEstey Yea I am new to this stuff as well ill try out 2015 along with all of the 1703 stuff. – IDontWantToMakeAnotherAccount Oct 25 '22 at 03:32
  • @CraigEstey Actually there is an issue. None of the version match up. VS 2015 version 1703 is Express which is something different from the others and is the only one that requires a VS subscription. Because of that I tried version 1607 however it seems the community version is completely broken. Same issue as https://stackoverflow.com/questions/32445763/a-setup-package-is-either-missing-or-damaged-error-while-installing-visual-stu but theres no fix. One post suggested downloading files and running in admin mode but 2 of the 4 files give a 404 error so I cant download them. – IDontWantToMakeAnotherAccount Oct 25 '22 at 04:18

1 Answers1

0

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
Luke
  • 11,211
  • 2
  • 27
  • 38
  • So I don’t need an SDK? Also do I still download those 8 modules under individual components the 2019 versions? Also when I download VS should I include a workspace since that is a common prompt. – IDontWantToMakeAnotherAccount Oct 25 '22 at 16:22
  • Modern versions of Visual Studio take care of installing the SDK, which is not needed for driver development anyway. – Luke Oct 25 '22 at 16:31