From 55db0cbe0d156a172f7cfe269fa046171fe6e5ec Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 20 Feb 2009 04:46:28 +0000 Subject: code cleanup --- src/win32/tunDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/win32/tunDevice.cpp') diff --git a/src/win32/tunDevice.cpp b/src/win32/tunDevice.cpp index 9b8e087..4986381 100644 --- a/src/win32/tunDevice.cpp +++ b/src/win32/tunDevice.cpp @@ -57,7 +57,7 @@ TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifc if(handle_ == INVALID_HANDLE_VALUE) { std::stringstream tapname; tapname << USERMODEDEVICEDIR << actual_node_ << TAPSUFFIX; - handle_ = CreateFile(tapname.str().c_str(), GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, 0); + handle_ = CreateFileA(tapname.str().c_str(), GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, 0); if(handle_ == INVALID_HANDLE_VALUE) { std::stringstream msg; msg << "Unable to open device: " << actual_node_ << " (" << actual_name_ << "): " << LogErrno(GetLastError()); @@ -156,10 +156,10 @@ bool TunDevice::getAdapter(std::string const& dev_name) else { std::stringstream tapname; tapname << USERMODEDEVICEDIR << actual_node_ << TAPSUFFIX; - handle_ = CreateFile(tapname.str().c_str(), GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, 0); + handle_ = CreateFileA(tapname.str().c_str(), GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, 0); if(handle_ == INVALID_HANDLE_VALUE) continue; - found = true; + found = true; break; } } -- cgit v1.2.3