diff options
Diffstat (limited to 'osnet')
| -rw-r--r-- | osnet/WindowsEthernetTap.cpp | 4 | ||||
| -rw-r--r-- | osnet/WindowsEthernetTapFactory.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/osnet/WindowsEthernetTap.cpp b/osnet/WindowsEthernetTap.cpp index 16fc72d6..8326597a 100644 --- a/osnet/WindowsEthernetTap.cpp +++ b/osnet/WindowsEthernetTap.cpp @@ -188,11 +188,11 @@ WindowsEthernetTap::WindowsEthernetTap( PROCESS_INFORMATION processInfo; memset(&startupInfo,0,sizeof(STARTUPINFOA)); memset(&processInfo,0,sizeof(PROCESS_INFORMATION)); - if (!CreateProcessA(NULL,(LPSTR)(std::string("\"") + _pathToHelpers + WindowsEthernetTapFactory::WINENV.devcon + "\" install \"" + _pathToHelpers + _winEnv.tapDriver + "\" zttap200").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) { + if (!CreateProcessA(NULL,(LPSTR)(std::string("\"") + _pathToHelpers + WindowsEthernetTapFactory::WINENV.devcon + "\" install \"" + _pathToHelpers + WindowsEthernetTapFactory::WINENV.tapDriver + "\" zttap200").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) { RegCloseKey(nwAdapters); if (devconLog != INVALID_HANDLE_VALUE) CloseHandle(devconLog); - throw std::runtime_error(std::string("unable to find or execute devcon at ") + _winEnv.devcon); + throw std::runtime_error(std::string("unable to find or execute devcon at ") + WindowsEthernetTapFactory::WINENV.devcon); } WaitForSingleObject(processInfo.hProcess,INFINITE); CloseHandle(processInfo.hProcess); diff --git a/osnet/WindowsEthernetTapFactory.cpp b/osnet/WindowsEthernetTapFactory.cpp index 6564e186..74703077 100644 --- a/osnet/WindowsEthernetTapFactory.cpp +++ b/osnet/WindowsEthernetTapFactory.cpp @@ -43,6 +43,7 @@ WindowsEthernetTapFactory::Env::Env() tapDriver = ((is64Bit == TRUE) ? "\\tap-windows\\x64\\zttap200.inf" : "\\tap-windows\\x86\\zttap200.inf"); #endif } +const WindowsEthernetTapFactory::Env WindowsEthernetTapFactory::WINENV; WindowsEthernetTapFactory::WindowsEthernetTapFactory(const char *pathToHelpers) : _pathToHelpers(pathToHelpers) |
