最終更新:2014-11-12 (水) 15:54:50 (3118d)
WinUSB
Top / WinUSB
Windows USB
Windows XP SP2以前はUSBデバイスドライバはカーネルモードである必要があったためWDFと共に開発された汎用USBドライバ
概要
Windows USB (WinUSB) is a generic driver for USB devices that was developed concurrently with the Windows Driver Foundation (WDF) for Windows XP with SP2. The WinUSB architecture consists of a kernel-mode driver (Winusb.sys) and a user-mode dynamic link library (winusb.dll) that exposes WinUSB functions. By using these functions, you can manage USB devices with user-mode software.
ドキュメント
http://msdn.microsoft.com/ja-jp/library/windows/hardware/ff540196(v=vs.85).aspx
- %%
http://www.microsoft.com/japan/whdc/connect/usb/WinUsb_HowTo.mspx%%
仕組み
- カーネルモードで動作するドライバ:winusb.sys
- ドライバとのインターフェイス:winusb.dll
対応プラットフォーム
OS | 対応 |
Windows 7 | x86,x64,Itanium |
Windows Server 2008 | x86,x64 |
Windows Vista | x86,x64 |
Windows Server 2003 | 非対応 |
Windows XP | SP2以降のx86,x64 |
Windows 2000 | 非対応 |
- アイソクロナス転送は非対応
関数 (winusb.h)
- WinUsb_GetDescriptor?
- WinUsb_Initialize
- WinUsb_QueryInterfaceSettings?
- WinUsb_QueryPipe?
- WinUsb_Free?
関連関数
- CreateFile
- GetDeviceFilePath?
- SetupDiGetClassDevs
- SetupDiEnumDeviceInterfaces
- SetupDiGetDeviceInterfaceDetail
- OpenDevice?
libusb-win32との比較
libusb-win32 device driver (libusb0.sys) has quite some advantages compared to WinUSB.
- 1) Open source, the device driver is GPLed, with libusb-0.1 compatible library (LGPL).
- 2) Support multiple configuration USB device.
- 3) Support isochronous transfer whereas WinUSB does not.
- 4) Support Windows 2000, Windows 2003? 32bit/64bit and Windows XP 64bit, Microsoft does not support WinUSB on these platforms. On the other hand, since version 1.2.0.0, libusb0.sys is digitally signed so it is similar to WinUSB -- both work under 64bit Windows which requires kernel mode driver to be signed, like 64bit Windows Vista or Windows 7.
- 5) WinUSB does not support multiple concurrent applications.
http://www.libusb.org/ticket/49
libusbK
- libusbKは、従来のlibusb-win32と呼ばれるプロジェクトによって作成されたドライバに手を入れたもので、WinUSBのAPIをエミュレーションしつつWinUSBでは使えなかったアイソクロナス転送も使える。
- WinUSBと同名の関数をlibusbK.dllがexportしている