1
votes

I downloaded the WDK 8.1 and samples and using Win 7 Debug Win32 build configuration while building with Visual Studio 2013 for the "Scanner File System Minifilter Driver" sample solution. It successfully built the solution.

The build output 3 files of interest to me:

1) scanner.sys (the scanner file system minifilter driver) 2) scanuser.exe (the user-land executable that talked to the driver) 3) scanner.inf (driver installation file)

I copied the files over to my VMware virtual machine (XP 32-bit, in this case) and installed the driver using the .inf file which put the appropriate registry keys in the registry and put a copy of the .sys file into C:\Windows\System32\drivers. Then I ran "net start scanner" which started the driver successfully.

So far, this all worked fine. However ...

When I ran the scanuser.exe file it says it's not a valid Win32 application.

How do I go about testing this if I can't run the executable?

Are there build options I have to set in order for this to work?

1

1 Answers

1
votes

Out of the box, Visual Studio 2013 will not produce executable that will run on Windows XP.

You must change the platform toolset:

In the Property Pages dialog box for the project, under Configuration Properties, General, set the Platform Toolset property to the desired Windows XP toolset. For example, choose Visual Studio 2012 – Windows XP (v110_xp) to create code that is binary compatible with the Microsoft Visual C++ 2012 Redistributable libraries.

In a similar project, I used the Visual Studio 2010 toolset.