Lakeview Research home > USB Central > USB Code > WinUSB

WinUSB

Jan Axelson

WinUSB a generic driver for devices that don't fit a defined USB class. The driver was introduced with Windows Vista and is also usable on Windows XP systems. The driver is not usable on earlier Windows editions. The driver supports control, bulk, and interrupt transfers.

Host Application

These are my .NET host applications for accessing devices that use the WinUSB driver. The applications are identical except for the programming language. Each includes an example INF file to match the device's Vendor ID and Product ID to a device interface GUID.

winusb_vb for Visual Basic .NET. Updated 3/13/08.

winusb_cs for Visual C# .NET. Updated 3/13/08.

Installing WinUSB on a PC requires files from the Windows Driver Kit (WDK), a free download from Microsoft.

Bug fix

I haven't had a chance to make this fix in the code. To run the VC# application under Vista, change:
deviceInfoSet = SetupDiGetClassDevs( ref myGuid, "", 0, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE );
to:
deviceInfoSet = SetupDiGetClassDevs( ref myGuid, null, 0, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE );

Device Firmware

mchp_winusb is my Microchip PIC microcontroller firmware for devices that use the WinUSB driver on the host. Written for the PIC 18F4550 and Microchip's C18 C compiler.

More Info

WinUSB. Microsoft documentation.

How to Use WinUSB to Communicate with a USB Device. From Microsoft.