Question

I am trying to use WinUSB in my project. The guide I am following is http://msdn.microsoft.com/en-us/library/ff540174.aspx. This article tells me to include the following files:

// Include Windows headers
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <strsafe.h>

// Include WinUSB headers
#include <winusb.h>
#include <Usb100.h>
#include <Setupapi.h>

The files windows.h, setupapi.h, and strsafe.h were found in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include.

Files usb100.h was found in C:\Program Files (x86)\Windows Kits\8.0\Include\shared.

And the files stdio.h, tchar.h were found in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include.

According to http://msdn.microsoft.com/en-us/library/windows/hardware/hh450839(v=vs.85).aspx, winusb.h is located in WDK8's Include\um folder, however after installing the WDK8 three times with both the pre-download and download methods, the file isn't there. I'm assuming that by Include\um, they're reffering to C:\Program Files (x86)\Windows Kits\8.0\Include\um. I've also done a search of my system and couldn't find winusb.h anywhere.

I also can't find winapifamily.h which, according to the second msdn page I linked, is included by winusb.h.

I'm on Windows 7 x64, with WDK8 and VC++ Express installed.

Was it helpful?

Solution 2

After installing the Windows 8 SDK, I was able to find winusb.h in C:\Program Files (x86)\Windows Kits\8.0\Include\um.

It appears that since version 8, winusb.h moved from the the WDK/DDK to the SDK.

OTHER TIPS

winusb.h is a part of the Windows DDK, and can (when the DDK is installed) be found under WINDDK\<BuildNumber>\inc\ddk.

More info how to make it work (including info on the file locations) can be found here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top