Connor McAdams (@cmcadams) commented about dlls/setupapi/devinst.c:
+ if (!prop_key) + return ERROR_INVALID_DATA; + if (!prop_type || (!buf && buf_size)) + return ERROR_INVALID_USER_BUFFER; + if (flags) + return ERROR_INVALID_FLAGS; + + if (IsEqualGUID( &prop_key->fmtid, &DEVPKEY_Device_DeviceDesc.fmtid )) + { + DWORD reg_prop = prop_key->pid - 2, size, type; + + if (prop_key->pid < 2 || reg_prop >= ARRAY_SIZE(PropertyMap) || !PropertyMap[reg_prop].devPropType) + return get_device_reg_property( device->key, prop_key, prop_type, buf, buf_size, req_size, flags ); + ret = ERROR_SUCCESS; + type = PropertyMap[reg_prop].devPropType; + switch (type) Now that we only have to handle one `DEVPROPTYPE` in a special way, this can probably just be an:
if (type == DEVPROP_TYPE_GUID)
{
...
}
else
{
...
}
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8515#note_109607