最終更新:2015-07-13 (月) 16:49:40 (3203d)
DEV_BROADCAST_DEVICEINTERFACE.dbcc_name
Top / DEV_BROADCAST_DEVICEINTERFACE.dbcc_name
メモ
- It seems by using the dbcc_name, we can know what device has been plugged into the system. Sadly, the answer is NO, dbcc_name is for OS internal use and is an identity, it is not human readable. A sample of dbcc_name is as follows:
\\?\USB#Vid_04e8&Pid_503b#0002F9A9828E0F06#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
内容
- \\?\USB: USB means this is a USB device class
- Vid_04e8&Pid_053b: Vid/Pid is VendorID and ProductID (but this is device class specific, USB use Vid/Pid, different device classes use different naming conventions)
- 002F9A9828E0F06: seems to be a unique ID (not sure about how this got generated)
- {a5dcbf10-6530-11d2-901f-00c04fb951ed}: the device interface class GUID
デバイス名の読み取り
- Now, by using this decoded information, we can get the device description or device friendly name by two methods:
- Read the registry directly: for our example dbcc_name, it will be, \\HKLM\SYSTEM\CurrentControlSet\Enum\USB\Vid_04e8&Pid_503b\0002F9A9828E0F06
- Use SetupDiXxx?
レジストリからデバイス名の収録
- FriendlyName
- http://stackoverflow.com/questions/2208722/how-to-get-friendly-device-name-from-dev-broadcast-deviceinterface-and-device-in