I am able to get the property keys (DEVPROPKEY) of a devnode. However I did not found a way to get the names and/or descriptions of those keys. It is allso possible to get the values of those property keys using CM_Get_DevNode_PropertyW.
if I use a LOOP to get the keys and values I get all the info except the NAME of the key ?
EDIT the keys are predefined in devpkey.h, like;
DEFINE_DEVPROPKEY(DEVPKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2); // DEVPROP_TYPE_STRING
DEFINE_DEVPROPKEY(DEVPKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); // DEVPROP_TYPE_STRING_LIST
At the moment I think the only way is to compare the the keys got from the function with predefined ones. Using Delphi I had to convert all of those keys from C++ code to Delphi code. Still I think there should be a way to get the names via a funcion call from cfgmgr.dll or setupapi.dll ?
This is the answer which I got from MSDN forum: the names aren't stored in the sytem in a queryable manner. you have to look at the type definitions to know what they are
This means that I will have to compare the keys got from funcion with the defined ones.
I hoped that the naming and/or descriptioning were stored somewhere so I don't have to translate the naming according to the systems language. This because the the key values are returned in systems language.