diff options
Diffstat (limited to 'tun/wintun/wintun_windows.go')
-rw-r--r-- | tun/wintun/wintun_windows.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go index bae1089..b558fd6 100644 --- a/tun/wintun/wintun_windows.go +++ b/tun/wintun/wintun_windows.go @@ -687,11 +687,11 @@ func (wintun *Wintun) deviceData() (setupapi.DevInfo, *setupapi.DevInfoData, err func (wintun *Wintun) AdapterHandle() (windows.Handle, error) { interfaces, err := setupapi.CM_Get_Device_Interface_List(wintun.devInstanceID, &deviceInterfaceNetGUID, setupapi.CM_GET_DEVICE_INTERFACE_LIST_PRESENT) if err != nil { - return windows.InvalidHandle, err + return windows.InvalidHandle, fmt.Errorf("Error listing NDIS interfaces: %v", err) } handle, err := windows.CreateFile(windows.StringToUTF16Ptr(interfaces[0]), windows.GENERIC_READ|windows.GENERIC_WRITE, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, nil, windows.OPEN_EXISTING, 0, 0) if err != nil { - return windows.InvalidHandle, fmt.Errorf("Open NDIS device failed: %v", err) + return windows.InvalidHandle, fmt.Errorf("Error opening NDIS device: %v", err) } return handle, nil } |