diff options
author | 2020-10-13 19:55:41 +0200 | |
---|---|---|
committer | 2020-10-30 16:50:59 +0100 | |
commit | a3d9431e70d0ffc9f36c0e12f2e2125e1f773104 (patch) | |
tree | b8c2031c76222186350b6e238f85e446a0dfd0f4 /api/driver.c | |
parent | api: unify callback function type names (diff) | |
download | wintun-a3d9431e70d0ffc9f36c0e12f2e2125e1f773104.tar.xz wintun-a3d9431e70d0ffc9f36c0e12f2e2125e1f773104.zip |
api: unify hardware ID string
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/driver.c')
-rw-r--r-- | api/driver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/driver.c b/api/driver.c index df10ace..0a4c2ca 100644 --- a/api/driver.c +++ b/api/driver.c @@ -302,7 +302,7 @@ InstallDriver(_In_ BOOL UpdateExisting) BOOL RebootRequired = FALSE; if (UpdateExisting && !UpdateDriverForPlugAndPlayDevicesW( - NULL, L"Wintun", InfPath, INSTALLFLAG_FORCE | INSTALLFLAG_NONINTERACTIVE, &RebootRequired)) + NULL, WINTUN_HWID, InfPath, INSTALLFLAG_FORCE | INSTALLFLAG_NONINTERACTIVE, &RebootRequired)) WINTUN_LOGGER_LAST_ERROR(L"Could not update existing adapters"); if (RebootRequired) WINTUN_LOGGER(WINTUN_LOG_WARN, L"A reboot might be required, which really should not be the case"); @@ -346,7 +346,7 @@ static WINTUN_STATUS RemoveDriver(VOID) SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData = DriverGetDrvInfoDetail(DevInfo, NULL, &DrvInfoData); if (!DrvInfoDetailData) continue; - if (!_wcsicmp(DrvInfoDetailData->HardwareID, L"wintun")) + if (!_wcsicmp(DrvInfoDetailData->HardwareID, WINTUN_HWID)) { PathStripPathW(DrvInfoDetailData->InfFileName); WINTUN_LOGGER(WINTUN_LOG_INFO, L"Removing existing driver"); @@ -396,7 +396,7 @@ DriverIsWintunAdapter(_In_ HDEVINFO DevInfo, _In_opt_ SP_DEVINFO_DATA *DevInfoDa SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData = DriverGetDrvInfoDetail(DevInfo, DevInfoData, &DrvInfoData); if (!DrvInfoDetailData) continue; - Found = !_wcsicmp(DrvInfoDetailData->HardwareID, L"wintun"); + Found = !_wcsicmp(DrvInfoDetailData->HardwareID, WINTUN_HWID); HeapFree(Heap, 0, DrvInfoDetailData); } SetupDiDestroyDriverInfoList(DevInfo, DevInfoData, SPDIT_COMPATDRIVER); |