forked from daynix/UsbDk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ControlDevice: Generate serial numbers for UsbDk devices
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 <[email protected]>
- Loading branch information
Dmitry Fleytman
committed
Feb 19, 2017
1 parent
2e945fe
commit a4bf95a
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters