From: Xiaofan C. <xia...@gm...> - 2010-02-19 14:47:31
|
On Fri, Feb 19, 2010 at 6:10 PM, Patrik Thalin <pat...@st...> wrote: > Hi all, > > I am looking for a solution to identify the physical USB ports used by a > device. I have looked at devcon in WDK to find the DeviceID eg. > USB\VID_xxxx&PID_yyyy\6&6B42B9C&0&4. This seem to be a unique for the > port used. I have successfully duplicated this to my application. By > calling SetupDiGetDeviceRegistryProperty and SetupDiGetDeviceInstanceId. > But I can't find a way to associate this to the driver handle. Can this > be done? > > > Any other suggestion on how identify the port is also welcome! Note that > I can not use a serial number in the device it has to be unique for the > USB port on the computer. Also note that I have several indentical units > connected. > I do not know the answer. You may have better luck trying out some other lists. The best one may be this newsgroup. microsoft.public.development.device.drivers http://groups.google.com/group/microsoft.public.development.device.drivers/topics But it is said to be non-trivial for any OS. http://old.nabble.com/Re%3A-how-to-get-device-info-from-mount-point-p16593540.html Some say it is not possible under Windows. http://www.winvistatips.com/uniquely-identify-usb-hid-device-t809662.html Might be possible under Linux or Mac OS X. http://old.nabble.com/How-to-get-the-Location-ID-and-Current-Available-information-on-linux--td25588308.html -- Xiaofan http://mcuee.blogspot.com |