Windows Driver Kit: Buses
WinUSB
Before Windows Vista, all USB device drivers had to operate in kernel mode. If you created a USB device for which the operating system did not have a native class driver, you had to write a kernel-mode device driver for your device.
In Windows Vista, the Windows USB (WinUSB) mechanism enables you to manage USB devices with user-mode software. The WinUSB architecture consists of the WinUSB kernel-mode driver (winusb.sys) and the WinUSB user-mode dynamic link library (Winusb.dll) that exposes the WinUSB user-mode client support routines.
When you manage your device with user-mode software, there are several advantages:
- You spend less time, effort, and expense devoted to driver development.
- Driver errors are less likely to cause system failure.
- The upgrade experience is improved for customers.
- Device power is simpler to manage.
- Error reporting is simpler, and you can leverage Windows user-mode error reporting mechanisms.
- The security of your drivers is improved. User-mode drivers cannot sniff data at the kernel level, so these drivers represent less of a security threat.
- Windows update packages are smaller.
You cannot use the WinUSB mechanism for:
- Data streaming through isochronous endpoints.
- Functions that already have kernel-mode support in the Windows operating system, such as modem functions (which TAPI supports) or LAN functions (which NDIS supports). You must use the interface that the Usbser.sys driver supports to manage modem devices with user-mode software.
The WinUSB section covers the following topics:
For more information about how to use WinUSB, see the
How to Use WinUSB to Communicate with a USB Device white paper on the WHDC Web site. For sample code, see the UMDF sample OSRUSBFX2 (\src\umdf\usb\fx2_driver).