Project site @ https://nadavrub.wordpress.com/2014/10/16/winusb-with-non-default-configuration/
While WinUSB was designed to simplify USB development, Comparing to a fully fetched USB Kernel mode driver, As of
Windows 8.1, WinUSB has few limitations, one, is the fact that while a USB device might expose multiple Configurations
to choose from, WinUSB supports only the default Configuration ( the first one ).
In this project we use a lower KDMF filter driver to force WinUSB to use the USB configuration we want.
Solution Structure:
UsbCfgCtrl - The lower filter KDMF driver used to set the desiered USB configuration
UsbCfgCtrl Package - The Driver deployment package
WinUSBSimple - A simple Console application demonstrating WinUSB usage with the non-default configuration
Usage:
- Update USB\VID_nnnn&PID_nnnn at UsbCfgCtrl.inx in accordance with the designated HW.
- Compile 'UsbCfgCtrl' and 'WinUSBSimple'
- Open 'UsbCfgCtrl Package' Property pages and check [X] 'Enable Deployment' under 'Driver Install'->'Deployment'
- Select Target machine, this machine should be provisioned for driver development, see the following for details:
http://msdn.microsoft.com/en-us/library/windows/hardware/dn265573(v=vs.85).aspx - Deploy by running 'UsbCfgCtrl Package'
- On the target machine Device manager verify the driver is properly functioning
- Remote Debug 'WinUSBSimple.exe' on the target machine.