When the type of a registry value given by RegQueryValueEx() is REG_RESOURCE_LIST constant (i.e. 8), the data received in the lpData (out) parameter is a pointer to a variable of type CM_RESOURCE_LIST struct.
According to MSDN, CM_RESOURCE_LIST struct is defined as follows:
typedef struct _...