https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b24f463a338cc5ccf75fc…
commit b24f463a338cc5ccf75fcb3fae6576877835006c
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Apr 24 17:04:11 2021 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Apr 24 17:04:11 2021 +0200
[UMPNPMGR] Start the device in SetupDeviceInstance
---
base/services/umpnpmgr/rpcserver.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c
index 63ae6e9b9ae..6319d328c8c 100644
--- a/base/services/umpnpmgr/rpcserver.c
+++ b/base/services/umpnpmgr/rpcserver.c
@@ -3007,11 +3007,13 @@ SetupDeviceInstance(
_In_ LPWSTR pszDeviceInstance,
_In_ DWORD ulMinorAction)
{
+ PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData;
HKEY hDeviceKey = NULL;
DWORD dwDisableCount, dwSize;
DWORD ulStatus, ulProblem;
DWORD dwError;
CONFIGRET ret = CR_SUCCESS;
+ NTSTATUS Status;
DPRINT1("SetupDeviceInstance(%S 0x%08lx)\n",
pszDeviceInstance, ulMinorAction);
@@ -3066,8 +3068,14 @@ SetupDeviceInstance(
if (ret != CR_SUCCESS)
goto done;
-
- /* FIXME: Start the device */
+ /* Start the device */
+ RtlInitUnicodeString(&ControlData.DeviceInstance,
+ pszDeviceInstance);
+ Status = NtPlugPlayControl(PlugPlayControlStartDevice,
+ &ControlData,
+ sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA));
+ if (!NT_SUCCESS(Status))
+ ret = NtStatusToCrError(Status);
done:
if (hDeviceKey != NULL)