How can a driver determine the full Device Instance ID for one of it’s
own devices?
I want to use this in WMI data to provide a link between a driver’s
custom WMI classes and the CIMv2 Win32_PnPEntity class. As this is an
WDF/KMDF driver each WMI instance exposed by the driver already includes
the device instance ID, up to a point, in the auto-generated
InstanceName property. The InstanceName is in fact the device instance
ID suffixed with an underscore and a numeric ID starting at 0. For example:
Hardware ID: PCI\VEN_1924&DEV_0703&SUBSYS_00011924&REV_01
Device Instance ID:
PCI\VEN_1924&DEV_0703&SUBSYS_00011924&REV_01\4&26a7f3f5&0&0008
WMI Instance Names:
PCI\VEN_1924&DEV_0703&SUBSYS_00011924&REV_01\4&26a7f3f5&0&0008_0
PCI\VEN_1924&DEV_0703&SUBSYS_00011924&REV_01\4&26a7f3f5&0&0008_1
PCI\VEN_1924&DEV_0703&SUBSYS_00011924&REV_01\4&26a7f3f5&0&0008_2
etc.
I’d prefer not to rely upon an implementation detail of WDF (which may
change in future) and force users of my driver’s WMI classes from having
to parse the WMI InstanceName and strip off the “_xxx”. The full device
instance ID isn’t available via
WdfDeviceQueryProperty()/IoGetDeviceProperty() but that does give me the
hardware ID. How can a driver determine the instance ID? or even just
the instance suffix information (4&26a7f3f5&0&0008 in the example above)
to append to the hardware ID to yield the full instance ID?
Best regards,
Andrew
–
Andrew Lee Solarflare Communications
mailto:xxxxx@solarflare.com http://www.solarflare.com/