mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 23:48:12 +00:00
[NETCFGX] Start a network adapter device after the custom install steps have been completed.
This could probably fix CORE-16103
This commit is contained in:
parent
8dc70d2454
commit
89c936fdd6
1 changed files with 31 additions and 0 deletions
|
@ -99,6 +99,7 @@ InstallNetDevice(
|
||||||
DWORD Characteristics,
|
DWORD Characteristics,
|
||||||
LPCWSTR BusType)
|
LPCWSTR BusType)
|
||||||
{
|
{
|
||||||
|
SP_DEVINSTALL_PARAMS_W DeviceInstallParams;
|
||||||
LPWSTR InstanceId = NULL;
|
LPWSTR InstanceId = NULL;
|
||||||
LPWSTR ComponentId = NULL;
|
LPWSTR ComponentId = NULL;
|
||||||
LPWSTR DeviceName = NULL;
|
LPWSTR DeviceName = NULL;
|
||||||
|
@ -112,6 +113,28 @@ InstallNetDevice(
|
||||||
WCHAR szBuffer[300];
|
WCHAR szBuffer[300];
|
||||||
PWSTR ptr;
|
PWSTR ptr;
|
||||||
|
|
||||||
|
DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
|
||||||
|
if (!SetupDiGetDeviceInstallParamsW(DeviceInfoSet,
|
||||||
|
DeviceInfoData,
|
||||||
|
&DeviceInstallParams))
|
||||||
|
{
|
||||||
|
rc = GetLastError();
|
||||||
|
ERR("SetupDiGetDeviceInstallParamsW() failed (Error %lu)\n", rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Do not start the adapter in the call to SetupDiInstallDevice */
|
||||||
|
DeviceInstallParams.Flags |= DI_DONOTCALLCONFIGMG;
|
||||||
|
|
||||||
|
if (!SetupDiSetDeviceInstallParamsW(DeviceInfoSet,
|
||||||
|
DeviceInfoData,
|
||||||
|
&DeviceInstallParams))
|
||||||
|
{
|
||||||
|
rc = GetLastError();
|
||||||
|
ERR("SetupDiSetDeviceInstallParamsW() failed (Error %lu)\n", rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* Install the adapter */
|
/* Install the adapter */
|
||||||
if (!SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData))
|
if (!SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData))
|
||||||
{
|
{
|
||||||
|
@ -389,6 +412,14 @@ InstallNetDevice(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Start the device */
|
||||||
|
if (!SetupDiRestartDevices(DeviceInfoSet, DeviceInfoData))
|
||||||
|
{
|
||||||
|
rc = GetLastError();
|
||||||
|
ERR("SetupDiRestartDevices() failed with error 0x%lx\n", rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
rc = ERROR_SUCCESS;
|
rc = ERROR_SUCCESS;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
Loading…
Reference in a new issue