1

I have VS 2013 + WDK installed on my PC and I've been trying to create a driver for XP. So I created a new KMDF Driver project from Visual Studio menu and changed the platform toolset to XP:

enter image description here

Basically I just tried the most basic template:

#include <ntddk.h>     
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)    
{
    DbgPrint("Hello World\n");  
    return STATUS_SUCCESS;
}  

However, when I change it I'm getting an error:

C1083: Cannot open include file: 'ntddk.h': No such file or directory

Can anyone tell me what I'm doing wrong? Or at least how I can compile a driver to support Windows XP?

Thanks a lot.

Community
  • 1
  • 1
user1326293
  • 923
  • 2
  • 9
  • 24
  • See [this answer](http://stackoverflow.com/a/19610405/33499) – wimh Jun 06 '15 at 10:14
  • @Wimmel, when I did this it just produced more errors, have an idea? – user1326293 Jun 06 '15 at 10:24
  • Yes, fix errors one by one. You need to show the errors, and your settings in the (Additional) Include Directories for anyone to help you. – wimh Jun 06 '15 at 10:38
  • 1
    Wrong toolset, you picked one that can only work for desktop apps. There is no toolset that can target XP drivers. You must do this the way it was done 14 years ago with makefiles from the command line. Using the proper version of the DDK is critical, you'll have to turn back that clock as well. Hard to get today, you'll need an MSDN subscription. – Hans Passant Jun 06 '15 at 11:52
  • @HansPassant, thanks, I used this approach eventually succeeding. – user1326293 Jun 06 '15 at 14:16
  • If you're saying you managed to solve your problem you should post an answer that explains the solution you found. – Ross Ridge Jun 06 '15 at 19:38

1 Answers1

0

v120 present a user mode develop kits, you should use kernaldriver8.1. And if you want to write a driver use both in xp and win7 , WDM is your best choice.