Hello again.
I’m still developing UMDF USB driver (including virtual COM port) for Windows 7 64 bit and there are some uncertainties about nontransient registry access in UMDF. At last for me.
I have a config application, where all of our connected USB devices are shown. These devices are differentiated by a special hardware ID, which are unique for every device from our company. You can add/change/delete properties of a hardware ID. These properties have to be stored in a persistent way, so that a device can be unplugged anytime and can read its configuration (dependend on its hardware ID) when it is plugged in again. In short, we need a place in the registry, where information concerning a special device is stored and not deleted, when the device is unplugged from host.
Our older WDM driver and the former config app had wide access to registry and there was no problem. In UMDF I have only “RetrieveDevicePropertyStore”, which supports four special paths in the registry. Hardware and device interface keys are not persistent for absent devices. DEVICEMAP key is an older key and for the serial/parallel devices, which should not be used (even to think about compatibility).
So there is only the “software key”. I tried to get readable access to this key in the UMDF driver and it worked fine. The problem is now to get the path to the key from inside the configuration application (which is a normal windows MFC 64 bit application). SetupDiCreateDevRegKey/SetupDiOpenDevRegKey (with DIREG_DRV) work fine, as long as there is at last ONE device connected. If not, there is no possibility to fill the needed PSP_DEVINFO_DATA structure.
Questions:
-
Is there a clean way to store device specific properties, which stay intact, even if the device is unplugged and can be accessed in a general way from the UMDF driver and from an outer application?
-
If it is correct, as i did it for know, how can I get the registry path to the driver from an application?
Many thanks in advance,
Tristan.