R
Romain TAILLANDIER
Hi group !
I am trying to detect my specific USB periphéral. It have a specific
VID and PID, but it is like an USB key
My goal is to detect plugged/unplugged USB peripherals, and check if
it is mine (using the VID PID), and do something at this time. in C#
Now,
- I am able to detect any USB peripheral connection, and react. i
found this on CodeProject in 5 or 6 different ways.
- I am able to know what is the volume name, and letter of all drives
(CodeProject)
- I am able to know if my Specific peripheral is connected by looking
at registry (HKLM\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR\\Enum)
- I am able to found my drive using the registry (HKEY_CURRENT_USER
\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC
\Volume) and parsing the name of the drive in a binary data key (very
dirty i know, but it is my only workaround, and i am not sure it work
for the moment)
But i can't get the link between the drive letter, and the VID / PID.
Please indicate me any way to perform this.
Thank you.
I am trying to detect my specific USB periphéral. It have a specific
VID and PID, but it is like an USB key
My goal is to detect plugged/unplugged USB peripherals, and check if
it is mine (using the VID PID), and do something at this time. in C#
Now,
- I am able to detect any USB peripheral connection, and react. i
found this on CodeProject in 5 or 6 different ways.
- I am able to know what is the volume name, and letter of all drives
(CodeProject)
- I am able to know if my Specific peripheral is connected by looking
at registry (HKLM\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR\\Enum)
- I am able to found my drive using the registry (HKEY_CURRENT_USER
\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC
\Volume) and parsing the name of the drive in a binary data key (very
dirty i know, but it is my only workaround, and i am not sure it work
for the moment)
But i can't get the link between the drive letter, and the VID / PID.
Please indicate me any way to perform this.
Thank you.