Is the PNPDeviceID unique

允我心安 提交于 2019-12-18 09:15:13

问题


I wonder if the PNPDeviceID of an USB drive is unique (at least a charge of identic devices) and if the ID does not change.

Thanks in advance.


回答1:


As far as I know -- No. For example, "USBSTOR\DISK&VEN_LG&PROD_USB_DRIVE&REV_1100\AA04012700014149&0" - is a device id of a usb stick. For all such given usb sticks device id will be the same. But Windows adds an instance id of device ("&0"), so it can distinguish them. If you plug two same usb sticks the device id of each of them will be different, for example: USBSTOR\DISK&VEN_LG&PROD_USB_DRIVE&REV_1100\AA04012700014149&0 USBSTOR\DISK&VEN_LG&PROD_USB_DRIVE&REV_1100\AA04012700014149&1

P.S. Sometimes Windows doesn't add instance of a device, if another same device isn't plugged. (I don't know why)



来源:https://stackoverflow.com/questions/11810046/is-the-pnpdeviceid-unique

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!