4

I am developing a Windows Kernel-Mode driver. I have installed WDK10, Windows SDK linked along with it, and Windows 7 SDK.

I'd like to target windows 7, so I need specific includes, etc., but Visual Studio only allows me to Retarget solution to Win10 or Win8.1, but I need Win7 SDK, for example, if I want to use ZwQuerySystemInformation. I tried reinstalling everything, but nothing helped.

I'm on Windows 10, so I can't install WDK 7.

  • VS integration wasn't possible until WDK 8.1. The WDK7 way is to use makefiles that build with nmake.exe. "Can't install" is hopelessly vague, installation isn't very useful anyway. Just do this on the Win7 machine you need to test your driver and xcopy the files if you want to build on your Win10 machine. – Hans Passant Jul 24 '16 at 09:14
  • @Hans Passant Oh, I was sure that it had an interaction with VS. That explains a lot then. Thanks for help! – P. Rozwałka Jul 24 '16 at 11:06
  • Well, the sad thing is that newer versions of WDK disallow you to oficialy target older versions of Windows. If you wish to target Windows 7, try to use WDK 8.1. It works fine for me (the driver actually works well on XP too when I am careful enough). If the latest WDK does not have a definition for ZwQuerySystemInformation, you can add it via __declspec(dllimport) directive. The question is whether newer versions of the kernel will stil export the function. – Martin Drab Aug 03 '16 at 18:54

1 Answers1

4

Windows 10 WDK allows you to develop drivers for down-level up to Windows 7. I don't think you need WDK 7. To build a driver targeting windows 7 using windows 10 WDK, create a driver project and then in the project properties->Driver->General, set the TargetVersion to Win7

ajbarb
  • 148
  • 8