diff --git a/api/adapter.c b/api/adapter.c index a85d17b..ba4467c 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -898,15 +898,19 @@ _Return_type_success_(return != INVALID_HANDLE_VALUE) HANDLE WINAPI return OpenDeviceObject(Adapter->DevInstanceID); } +static BOOL +IsWindows10(void) +{ + DWORD MajorVersion; + RtlGetNtVersionNumbers(&MajorVersion, NULL, NULL); + return MajorVersion >= 10; +} + static BOOL HaveWHQL(void) { if (HAVE_WHQL) - { - DWORD MajorVersion; - RtlGetNtVersionNumbers(&MajorVersion, NULL, NULL); - return MajorVersion >= 10; - } + return IsWindows10(); return FALSE; } @@ -1418,6 +1422,9 @@ static _Return_type_success_(return != NULL) WINTUN_ADAPTER *CreateAdapter( { LOG(WINTUN_LOG_INFO, L"Creating adapter"); + if (!IsWindows10()) + RequestedGUID = NULL; + if (RequestedGUID) { WCHAR RegPath[MAX_REG_PATH];