Detect an USB key



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.


.



Relevant Pages

  • Re: How windows differentiates multiple USB devices of same type?
    ... second is how the device itself with a unique identity, ie how to tell the difference between 2 devices which have the same vid / pid pair. ... multiple USB devices of same type. ... Eg USB stick from a vendor. ...
    (microsoft.public.development.device.drivers)
  • Re: Please suggest USB to RS232 adapter that works 100%
    ... I've purchased one already made by "Cypress Semiconductor" but it ... The VID is 04b4 and the PID is 5500. ... Can anyone suggest a USB to RS232 adapter that does its job perfectly ...
    (comp.arch.embedded)
  • Re: Please suggest USB to RS232 adapter that works 100%
    ... I've purchased one already made by "Cypress Semiconductor" but it ... The VID is 04b4 and the PID is 5500. ... Can anyone suggest a USB to RS232 adapter that does its job perfectly ...
    (comp.arch.embedded)
  • Re: USB device with no drive letter
    ... I need to show a device installed as USB but not storage(no drive letter) ... provided it's VID, PID & Serial Number. ...
    (microsoft.public.development.device.drivers)
  • Drives missing at boot
    ... finds its disk drives at each boot. ... Capabilities: Advanced Error Reporting ... 00:1a.0 USB Controller: Intel Corporation 82801JI USB ... Capabilities: PCI Advanced Features ...
    (Linux-Kernel)