1
votes

I am using C#.

I am using DirectShowLib to enumerate a list of usb cameras in my network.

I get 2 cameras back. They are:

webcam#1

Name: USB Camera

Path:

@device:pnp:\?\usb#vid_045e&pid_0770&mi_00#6&26bce921&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global

webcam#2

Name: Professional financial camera

Path:

@device:pnp:\?\usb#vid_1871&pid_0d01&mi_00#6&ba6589a&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global

Now I cannot rely on the name of the camera to uniquely identify it as I may have more than 1 camera from the same manufacturer.

Now, am I correct in saying that the path value is a dynamic value relation to which usb port it is plugged into or is there a part of that path that is the mac/guid of the webcam.

Any guidance... thanks

1
excellent. Thanks :)Andrew Simpson
Added it as an answer instead.Ron Beyer
@RonBeyer HI, I am still reading the page. It seems you cannot have a unique id for the usbs if the usbs are the same make and model. I would jsut like to leave the question open for a bit in case some one knows different. ThanksAndrew Simpson

1 Answers

1
votes

See http://community.silabs.com/t5/Interface-Knowledge-Base/Windows-USB-Device-Path/ta-p/114059 for information on USB path strings.

Please note however, that at least prior to Windows 7, this format was known to change between service packs and may be an unreliable method in older versions of windows.