Device Instance ID

Hi everyone,

I was looking for the audio name of a device and I noticed that the name
is in the registry under

HLM\System\Control\DeviceClasses{GUID}\ {Special Format of Device
Instance Id but \ replaced with #}
e.g.
HLM\System\Control\DeviceClasses{6994AD04-93EF-11D0-A3CC-00A0C9223196}\
##?#PCI#VEN_8086&DEV_24C5&SUBSYS_01601028&REV_01#3&172E68DD&0&FD#{6994ad04-93ef-11d0-a3cc-00a0c9223196}

I went searching to how to get the “Device Instance Id” property of the
audio device and came across IoGetDeviceProperty() but it doesn’t return
the value in the device manager. Does anyone know the correct way to
get that information?

I can get the hardware id, but that isn’t the full Device Instance ID of
the device.
DevicePropertyHardwareID = PCI\VEN_8086&DEV_24C5&SUBSYS_01601028&REV_01

Any ideas people?

Device instance ids are not exposed to km components (by design). The reg value you are pointing is a device interface string, its format is opaque and you should not parse it. Furthermore, the presense of that value is internal and subject to change, in a future release it can disappear entirely

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: NCH Obble Smith
Sent: Monday, October 26, 2009 6:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Device Instance ID

Hi everyone,

I was looking for the audio name of a device and I noticed that the name
is in the registry under

HLM\System\Control\DeviceClasses{GUID}\ {Special Format of Device
Instance Id but \ replaced with #}
e.g.
HLM\System\Control\DeviceClasses{6994AD04-93EF-11D0-A3CC-00A0C9223196}<br>##?#PCI#VEN_8086&DEV_24C5&SUBSYS_01601028&REV_01#3&172E68DD&0&FD#{6994ad04-93ef-11d0-a3cc-00a0c9223196}

I went searching to how to get the “Device Instance Id” property of the
audio device and came across IoGetDeviceProperty() but it doesn’t return
the value in the device manager. Does anyone know the correct way to
get that information?

I can get the hardware id, but that isn’t the full Device Instance ID of
the device.
DevicePropertyHardwareID = PCI\VEN_8086&DEV_24C5&SUBSYS_01601028&REV_01

Any ideas people?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Doron I surely get that the device instance ID and the device path (the string we pass to CreateFile) should be treated as opaque and they might change, but it is clear that these strings are built in a way that reflects some information about the “physical location” of the device.

I am wandering then, what way I can persistently identify a device based on its location, so that if I have many identical devices, each with their own physical position and task to execute (imagine cameras) and replace one of them with an identical the software will automatically start using the new device for whatever task the old one was doing, without having to go through a manual reconfiguration process.

Dimitris

>Device instance ids are not exposed to km components (by design).

Sorry Doron, but why such a strange design decision? to avoid ever documenting the format of the IDs? or why?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> I am wandering then, what way I can persistently identify a device based on its location, so that if I

have many identical devices, each with their own physical position and task to execute

There is “device text location information” (or similarly called) property.

I use it widely to corellate the VM guest’s virtual hard disks with the .VHD files - in the guest, it contains the SCSI LUN numbering, and then I can look at VM management tool to corellate the SCSI numbers with the .VHD file name for this VM.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

xxxxx@staikos.name wrote:

Doron I surely get that the device instance ID and the device path (the string we pass to CreateFile) should be treated as opaque and they might change, but it is clear that these strings are built in a way that reflects some information about the “physical location” of the device.

I am wandering then, what way I can persistently identify a device based on its location, so that if I have many identical devices, each with their own physical position and task to execute (imagine cameras) and replace one of them with an identical the software will automatically start using the new device for whatever task the old one was doing, without having to go through a manual reconfiguration process.

If your devices do not have serial numbers, things will work exactly as
you have described. The system identifies the device by its location.

If you do have serial numbers, then the current design does require
reconfiguration.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.