Windows recognizes USB devices by PID/VID/SN combination, for each new USB device plugged in it generates a new cached driver information entry in the registry. When UsbDk hides or redirects a device it creates a virtual device with UsbDk VID/PID and a generated serial number. On one hand, this serial number should be unique because there should be no multiple devices with the same PID/VID/SN combination at any given moment of time. On the other hand, UsbDk should re-use serial numbers of unplugged devices, because we don't want Windows to cache one more driver information entry each time we redirect of hide a device. This patch introduces a simple but efficient mechanism for serial number generation for virtual UsbDk devices. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com> |
||
|---|---|---|
| Documentation | ||
| Tools | ||
| UsbDk | ||
| UsbDk Package | ||
| UsbDkController | ||
| UsbDkHelper | ||
| UsbDkInstHelper | ||
| .editorconfig | ||
| .gitignore | ||
| ARCHITECTURE | ||
| buildAll.bat | ||
| LICENSE | ||
| MAINTAINERS | ||
| README.md | ||
| UsbDk.sln | ||
UsbDk
UsbDk (USB Development Kit) is a open-source library for Windows meant to provide user mode applications with direct and exclusive access to USB devices by detaching those from Windows PNP manager and device drivers and providing user mode with API for USB-specific operations on the device.
The library is intended to be as generic as possible, support all types of USB devices, bulk and isochronous transfers, composite devices etc.
Library supports all Windows OS versions starting from Windows XP/2003.
Documentation
- See ARCHITECTURE document in the source tree root.
- See Documentation folder in the source tree root.
- See UsbDkHelper\UsbDkHelper.h UsbDkHelper\UsbDkHelperHider.h for API documentation
Building
Tools required:
- Visual Studio 2013/Visual Studio 2013 Express update 4 or newer
- WDK 8.1
- WDK 7.1 (for Windows XP/2003/Vista/2008 builds)
Compilation
Just open UsbDk.sln from the source tree root in Visual Studio 2013 and compile desired configuration.
Installing and running
Use UsbDkController.exe to install/uninstall and verify basic operation. Run UsbDkController.exe without parameters for command line options.