|
21 | 21 | #include <devguid.h> |
22 | 22 | #include <iphlpapi.h> |
23 | 23 | #include <ndisguid.h> |
24 | | -#include <newdev.h> |
25 | 24 | #include <NTSecAPI.h> |
26 | 25 | #include <SetupAPI.h> |
27 | 26 | #include <Shlwapi.h> |
@@ -1146,8 +1145,7 @@ EnsureWintunUnloaded(void) |
1146 | 1145 | static _Return_type_success_(return != FALSE) BOOL SelectDriver( |
1147 | 1146 | _In_ HDEVINFO DevInfo, |
1148 | 1147 | _In_opt_ SP_DEVINFO_DATA *DevInfoData, |
1149 | | - _Inout_ SP_DEVINSTALL_PARAMS_W *DevInstallParams, |
1150 | | - _Inout_ BOOL *RebootRequired) |
| 1148 | + _Inout_ SP_DEVINSTALL_PARAMS_W *DevInstallParams) |
1151 | 1149 | { |
1152 | 1150 | static const FILETIME OurDriverDate = WINTUN_INF_FILETIME; |
1153 | 1151 | static const DWORDLONG OurDriverVersion = WINTUN_INF_VERSION; |
@@ -1267,12 +1265,6 @@ static _Return_type_success_(return != FALSE) BOOL SelectDriver( |
1267 | 1265 | goto cleanupDelete; |
1268 | 1266 | } |
1269 | 1267 | _Analysis_assume_nullterminated_(InfStorePath); |
1270 | | - BOOL UpdateRebootRequired = FALSE; |
1271 | | - if (ExistingAdapters && |
1272 | | - !UpdateDriverForPlugAndPlayDevicesW( |
1273 | | - NULL, WINTUN_HWID, InfStorePath, INSTALLFLAG_FORCE | INSTALLFLAG_NONINTERACTIVE, &UpdateRebootRequired)) |
1274 | | - LOG(WINTUN_LOG_WARN, L"Could not update existing adapters"); |
1275 | | - *RebootRequired = *RebootRequired || UpdateRebootRequired; |
1276 | 1268 |
|
1277 | 1269 | SetupDiDestroyDriverInfoList(DevInfo, DevInfoData, SPDIT_COMPATDRIVER); |
1278 | 1270 | DestroyDriverInfoListOnCleanup = FALSE; |
@@ -1395,7 +1387,7 @@ static _Return_type_success_(return != NULL) WINTUN_ADAPTER *CreateAdapter( |
1395 | 1387 | goto cleanupDevInfo; |
1396 | 1388 | } |
1397 | 1389 |
|
1398 | | - if (!SelectDriver(DevInfo, &DevInfoData, &DevInstallParams, RebootRequired)) |
| 1390 | + if (!SelectDriver(DevInfo, &DevInfoData, &DevInstallParams)) |
1399 | 1391 | { |
1400 | 1392 | LastError = LOG(WINTUN_LOG_ERR, L"Failed to select driver"); |
1401 | 1393 | goto cleanupDevInfo; |
|
0 commit comments