mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:23:01 +00:00
[UMPNPMGR][USETUP] Use PlugPlayControlStartDevice in usetup and umpnpmgr
Instead of PlugPlayControlResetDevice, PlugPlayControlStartDevice should be used for a newly installed device. For usetup, add a device status check before starting attempt, so we're not touching devices which are already started. CORE-17463 CORE-17490
This commit is contained in:
parent
59a5dba443
commit
abbc5ba45a
2 changed files with 31 additions and 16 deletions
|
@ -3081,17 +3081,14 @@ static CONFIGRET
|
|||
EnableDeviceInstance(
|
||||
_In_ LPWSTR pszDeviceInstance)
|
||||
{
|
||||
PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData;
|
||||
PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData;
|
||||
CONFIGRET ret = CR_SUCCESS;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("Enable device instance %S\n", pszDeviceInstance);
|
||||
|
||||
RtlInitUnicodeString(&ResetDeviceData.DeviceInstance,
|
||||
pszDeviceInstance);
|
||||
Status = NtPlugPlayControl(PlugPlayControlResetDevice,
|
||||
&ResetDeviceData,
|
||||
sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA));
|
||||
RtlInitUnicodeString(&ControlData.DeviceInstance, pszDeviceInstance);
|
||||
Status = NtPlugPlayControl(PlugPlayControlStartDevice, &ControlData, sizeof(ControlData));
|
||||
if (!NT_SUCCESS(Status))
|
||||
ret = NtStatusToCrError(Status);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue