What is the recommended way for a WinXP WDF driver to dynamically change the device description displayed by the Device Manager?
I’m writing a WDF driver for a USB data acquisition device. Several of these devices, differing only by the DeviceID (DID) found in their USB Device Descriptor, can be connected to a PC simultaneously.
The INF file contains a generic device description which is displayed in the Device Manager and also shows up as the DeviceDesc value in the (device instance) hardware key in the registry. But I would like to update this description from the WDF EvtDevicePrepareHardware callback function once I’ve obtained the DID for the currently attached hardware.
I can get the current description using IoGetDeviceProperty with DevicePropertyDeviceDescription. But have been unable to find a corresponding IoSetDeviceProperty function for saving an updated description.
My next thought was to just update the DeviceDesc in the hardware key directly, although this is probably discouraged behavior. But calling WdfDeviceOpenRegistryKey with PLUGPLAY_REGKEY_DEVICE for opening the hardware key seems to open it’s “Device Parameters” subkey instead. So I wondered if there is an easy way to go up one level in the registry.
Any help you can give on these issues is much appreciated.
Thanks, Wendy Tucker
There is no API to get the parent HKEY of device parameters. Have you tried IoSetDevicePropertyData(DEVPKEY_Device_DeviceDesc) ?
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@symres.com
Sent: Thursday, July 29, 2010 3:38 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Changing device description in Device Manager from WDF driver ?
What is the recommended way for a WinXP WDF driver to dynamically change the device description displayed by the Device Manager?
I’m writing a WDF driver for a USB data acquisition device. Several of these devices, differing only by the DeviceID (DID) found in their USB Device Descriptor, can be connected to a PC simultaneously.
The INF file contains a generic device description which is displayed in the Device Manager and also shows up as the DeviceDesc value in the (device instance) hardware key in the registry. But I would like to update this description from the WDF EvtDevicePrepareHardware callback function once I’ve obtained the DID for the currently attached hardware.
I can get the current description using IoGetDeviceProperty with DevicePropertyDeviceDescription. But have been unable to find a corresponding IoSetDeviceProperty function for saving an updated description.
My next thought was to just update the DeviceDesc in the hardware key directly, although this is probably discouraged behavior. But calling WdfDeviceOpenRegistryKey with PLUGPLAY_REGKEY_DEVICE for opening the hardware key seems to open it’s “Device Parameters” subkey instead. So I wondered if there is an easy way to go up one level in the registry.
Any help you can give on these issues is much appreciated.
Thanks, Wendy Tucker
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
That sounds good. But is IoSetDevicePropertyData(DEVPKEY_Device_DeviceDesc) available for Win XP SP2?
– Wendy
nope
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@symres.com
Sent: Thursday, July 29, 2010 4:15 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Changing device description in Device Manager from WDF driver ?
That sounds good. But is IoSetDevicePropertyData(DEVPKEY_Device_DeviceDesc) available for Win XP SP2?
– Wendy
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