[UMPNPMGR] Set the data type in all cases of PNP_GetDeviceRegProp

CORE-14187
This commit is contained in:
Victor Perevertkin 2020-12-06 19:48:38 +03:00
parent 2d6c6fa38d
commit ff13301eb2
No known key found for this signature in database
GPG key ID: C750B7222E9C7830

View file

@ -1803,6 +1803,7 @@ PNP_GetDeviceRegProp(
case CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME:
PlugPlayData.Property = PNP_PROPERTY_PHYSICAL_DEVICE_OBJECT_NAME;
*pulRegDataType = REG_SZ;
break;
case CM_DRP_CAPABILITIES:
@ -1823,18 +1824,22 @@ PNP_GetDeviceRegProp(
case CM_DRP_BUSTYPEGUID:
PlugPlayData.Property = PNP_PROPERTY_BUSTYPEGUID;
*pulRegDataType = REG_BINARY;
break;
case CM_DRP_LEGACYBUSTYPE:
PlugPlayData.Property = PNP_PROPERTY_LEGACYBUSTYPE;
*pulRegDataType = REG_DWORD;
break;
case CM_DRP_BUSNUMBER:
PlugPlayData.Property = PNP_PROPERTY_BUSNUMBER;
*pulRegDataType = REG_DWORD;
break;
case CM_DRP_ENUMERATOR_NAME:
PlugPlayData.Property = PNP_PROPERTY_ENUMERATOR_NAME;
*pulRegDataType = REG_SZ;
break;
case CM_DRP_SECURITY:
@ -1855,6 +1860,7 @@ PNP_GetDeviceRegProp(
case CM_DRP_ADDRESS:
PlugPlayData.Property = PNP_PROPERTY_ADDRESS;
*pulRegDataType = REG_DWORD;
break;
case CM_DRP_UI_NUMBER_DESC_FORMAT:
@ -1863,33 +1869,40 @@ PNP_GetDeviceRegProp(
case CM_DRP_DEVICE_POWER_DATA:
PlugPlayData.Property = PNP_PROPERTY_POWER_DATA;
*pulRegDataType = REG_BINARY;
break;
case CM_DRP_REMOVAL_POLICY:
PlugPlayData.Property = PNP_PROPERTY_REMOVAL_POLICY;
*pulRegDataType = REG_DWORD;
break;
case CM_DRP_REMOVAL_POLICY_HW_DEFAULT:
PlugPlayData.Property = PNP_PROPERTY_REMOVAL_POLICY_HARDWARE_DEFAULT;
*pulRegDataType = REG_DWORD;
break;
case CM_DRP_REMOVAL_POLICY_OVERRIDE:
lpValueName = L"RemovalPolicy";
*pulRegDataType = REG_DWORD;
break;
case CM_DRP_INSTALL_STATE:
PlugPlayData.Property = PNP_PROPERTY_INSTALL_STATE;
*pulRegDataType = REG_DWORD;
break;
#if (WINVER >= _WIN32_WINNT_WS03)
case CM_DRP_LOCATION_PATHS:
PlugPlayData.Property = PNP_PROPERTY_LOCATION_PATHS;
*pulRegDataType = REG_MULTI_SZ;
break;
#endif
#if (WINVER >= _WIN32_WINNT_WIN7)
case CM_DRP_BASE_CONTAINERID:
PlugPlayData.Property = PNP_PROPERTY_CONTAINERID;
*pulRegDataType = REG_SZ;
break;
#endif
@ -3454,7 +3467,7 @@ PNP_QueryRemove(
pszDeviceID);
PlugPlayData.VetoName = pszVetoName;
PlugPlayData.NameLength = ulNameLength;
// PlugPlayData.Flags =
// PlugPlayData.Flags =
Status = NtPlugPlayControl(PlugPlayControlQueryAndRemoveDevice,
&PlugPlayData,
@ -3502,7 +3515,7 @@ PNP_RequestDeviceEject(
pszDeviceID);
PlugPlayData.VetoName = pszVetoName;
PlugPlayData.NameLength = ulNameLength;
// PlugPlayData.Flags =
// PlugPlayData.Flags =
Status = NtPlugPlayControl(PlugPlayControlQueryAndRemoveDevice,
&PlugPlayData,