Visual Studio + WDK include files

Hi all !

While trying to compile a simple UM app that talks to my usb device (by means of WinUSB) I experienced the following problem: the WinUSB howto says you have to #include usb.h (and some other files), and so I pointed VS 2008 to the corresponding WDK dir, but hitting the compile button only produced a massive amount of errors. After searching around for a while I found this:
http://stackoverflow.com/questions/1492982/compiling-an-application-that-uses-winusb
A-ha!
I didn’t know that VS and the WDK don’t play well together (if at all?).

The guy in the above thread still managed to use VS in this case , with some trial-and-error-what-includes-do-I-have-to-pull-out-of-the-WDK. Not a clean approach if you ask me.

So, a single WDK include file means that I have to use the WDK build tool ?

Christoph

That’s certainly the easiest route/best plan of attack.

Unfortunately, historically VS, the SDK and the DDK/WDK do not play well with each other.

Some of these issues are due header file combinations that don’t really make a great deal of sense, like including ‘ntddk.h’ and ‘windows.h.’

Some of these issues are just ‘cosmetic,’ if you will, due to differences in headers that probably shouldn’t exist but do, and that might what you’re seeing in the case of winusb; I really don’t know.

In general, however, building a driver without using the WDK toolchain (at least) and BUILD (unless you really know what you’re doing and have a need) is asking for trouble.

Good luck,

mm

Actually, this assumes that what you’re trying to compile will do so with the sketchy wdk user mode library/header support.

mm

xxxxx@gmx.net wrote:

While trying to compile a simple UM app that talks to my usb device (by means of WinUSB) I experienced the following problem: the WinUSB howto says you have to #include usb.h (and some other files), and so I pointed VS 2008 to the corresponding WDK dir, but hitting the compile button only produced a massive amount of errors.

All you need are winusb.h, winusbio.h, usb.h, usb100.h, usb200.h. I
generally copy them into a subdirectory in my WinUSB projects.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I will give it a try.
Thank you !

Christoph