[UMPNPMGR] Start the device in SetupDeviceInstance

This commit is contained in:
Eric Kohl 2021-04-24 17:04:11 +02:00
parent d5b20cb118
commit b24f463a33

View file

@ -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)