https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ff13301eb2a1b48768a8d…
commit ff13301eb2a1b48768a8dc125c4983fe90a2dec8
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Dec 6 19:48:38 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Sun Dec 6 19:48:38 2020 +0300
[UMPNPMGR] Set the data type in all cases of PNP_GetDeviceRegProp
CORE-14187
---
base/services/umpnpmgr/rpcserver.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c
index 004eb659b01..1d14d978ab0 100644
--- a/base/services/umpnpmgr/rpcserver.c
+++ b/base/services/umpnpmgr/rpcserver.c
@@ -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,