Home > USB Central > USB Code > WinUSB
WinUSB
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.
Device Installation without an INF File
New! You can now install WinUSB devices without having to provide a device-specific INF file. How to install WinUSB.sys without a custom INF From Microsoft.
Adapt these descriptor sets to enable using the WinUSB driver without a vendor-provided INF file.
Microsoft OS 2.0 descriptors (requires Windows 8.1 or later)
Demonstration of automatically installing the generic Windows WinUSB.sys driver using only firmware descriptors on the TI Stellaris LaunchPad. From Brandon White.
How to use the system INF file on Windows XP, Windows Vista, and Windows 7.
My 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.
Current Version
winusb_cs_31.zip Adds support for isochronous transfers. Isochronous transfers require Windows 8.1, but the application will run on earlier Windows versions. Updated 1/10/16.
For Windows 10
To use the winusb_cs project in Windows 10, open the .csproj file in Notepad or another text editor and delete this information, which relates to the signing certificate:
<PropertyGroup> <ManifestCertificateThumbprint>xxxxx xxxxxx</ManifestCertificateThumbprint> <ManifestKeyFile>xxxxxxxx.pfx</ManifestKeyFile> <GenerateManifests>true</GenerateManifests> <SignManifests>false</SignManifests> </PropertyGroup>
Older Versions
Use the latest version (above) if you can. I'm not updating or fixing bugs in these older versions.
winusb_cs v2.2 for Visual C# .NET. Created with Visual Studio 2012 for the .NET Framework V4.0 or later. Uses WMI to detect device arrival and removal. Uses SafeWinUsbHandle for WinUsb_Initialize. Updated 5/5/14.
winusb_vb v2.2 for Visual Basic.NET. Created with Visual Studio 2012 for the .NET Framework V4.0 or later. Uses WMI to detect device arrival and removal. Uses SafeWinUsbHandle for WinUsb_Initialize. Updated 5/9/14.
winusb_cs v2.1 for Visual C# .NET. Created with Visual Studio 2012 for the .NET Framework V4.0 or later. Uses WMI to detect device arrival and removal. Updated 10/18/13.
winusb_vb v2.1 for Visual Basic.NET. Created with Visual Studio 2012 for the .NET Framework V4.0 or later. Uses WMI to detect device arrival and removal. Updated 10/22/13.
winusb_cs for Visual C# .NET v2.0. Created with Visual Studio 2012 for the .NET Framework V4.0 or later. Updated 5/3/12.
winusb_vb for Visual Basic .NET. Created with Visual Studio 2008 for the .NET Framework V2.0 or later. Updated 2/11/09.
winusb_cs for Visual C# .NET. Created with Visual Studio 2008 for the .NET Framework V2.0 or later. Updated 2/11/09.
winusb_vb for Visual Basic .NET. Created with Visual Studio 2005 and the .NET Framework V2.0.
winusb_cs for Visual C# .NET. Created with Visual Studio 2005 and the .NET Framework V2.0.
WDK
Installing WinUSB on a PC requires files from the Windows Driver Kit (WDK), a free download from Microsoft.
Linux
Other Host Software
Zadig is a Windows application that installs generic USB drivers, such as WinUSB, libusb-win32/libusb0.sys or libusbK, to help you access USB devices.
winusbnet WinUSB .NET wrapper library. From madwizard-thomas.
WinUSB Component for .Net. For bulk transfers. From Asaf Shelly.
Device Firmware
For devices whose host driver is WinUSB.
Also see descriptors.
Microchip C18
device-winusb_lvr.zip Written for the PIC 18F4550 and Microchip's MPLAB C18 compiler with the Microchip Libraries for Applications v2013-02-15. See the readme file to find out how to create the project in the Framework directory structure. (Microchip provides WinUSB examples, but my code supports more endpoints and vendor-defined control transfers.) Updated 5/3/13.
Older versions
Use the newest Framework and the code above unless you have a compelling reason not to.
pic_usb_device_winusb_jan_axelson_10.zip For the V2.6a USB Framework.
winusb_c18_fsusb_fw2-5.zip for the V2.5 Framework.
winusb_c18_fsusb_fw2-3.zip for the V2.3 Framework
winusb_c18_fsusb.zip
for the V2.1 Framework
mchp_winusb
for the V1.x Framework.
PICBASIC PRO
picbasic_winusb.zip for interrupt and bulk transfers in PICBASIC PRO.
More Information
WinUSB. Microsoft documentation.
How to Use WinUSB to Communicate with a USB Device. From Microsoft.