Changeset 34274 in vbox
- Timestamp:
- Nov 23, 2010 10:39:27 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/USBLib-win.cpp
r34265 r34274 100 100 if (!DeviceIoControl(hOut, SUPUSB_IOCTL_GET_VERSION, NULL, 0,&version, sizeof(version), &cbReturned, NULL)) 101 101 { 102 Log(("DeviceIoControl SUPUSB_IOCTL_GET_VERSION failed with rc=%d\n", GetLastError()));102 Log(("DeviceIoControl SUPUSB_IOCTL_GET_VERSION failed with LastError=%Rwa\n", GetLastError())); 103 103 goto failure; 104 104 } … … 112 112 if (!DeviceIoControl(hOut, SUPUSB_IOCTL_IS_OPERATIONAL, NULL, 0, NULL, NULL, &cbReturned, NULL)) 113 113 { 114 Log(("DeviceIoControl SUPUSB_IOCTL_IS_OPERATIONAL failed with rc=%d\n", GetLastError()));114 Log(("DeviceIoControl SUPUSB_IOCTL_IS_OPERATIONAL failed with LastError=%Rwa\n", GetLastError())); 115 115 goto failure; 116 116 } … … 151 151 152 152 functionClassDeviceData = (PSP_DEVICE_INTERFACE_DETAIL_DATA) RTMemAllocZ(predictedLength); 153 if (NULL == functionClassDeviceData)153 if (NULL == functionClassDeviceData) 154 154 { 155 155 return false; … … 1693 1693 { 1694 1694 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS 1695 AssertMsgFailed(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with %d\n", GetLastError()));1695 AssertMsgFailed(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with LastError=%Rwa\n", GetLastError())); 1696 1696 #else 1697 LogRel(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with %d\n", GetLastError()));1697 LogRel(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with LastError=%Rwa\n", GetLastError())); 1698 1698 #endif 1699 1699 return NULL; … … 1763 1763 { 1764 1764 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS 1765 AssertMsgFailed(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with %d\n", GetLastError()));1765 AssertMsgFailed(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with LastError=%Rwa\n", GetLastError())); 1766 1766 #else 1767 LogRel(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with %d\n", GetLastError()));1767 LogRel(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with LastError=%Rwa\n", GetLastError())); 1768 1768 #endif 1769 1769 RTMemFree(configDescReq); … … 2120 2120 { 2121 2121 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS 2122 AssertMsgFailed(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with %d\n", GetLastError()));2122 AssertMsgFailed(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with LastError=%Rwa\n", GetLastError())); 2123 2123 #else 2124 LogRel(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with %d\n", GetLastError()));2124 LogRel(("DeviceIoControl IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION failed with LastError=%Rwa\n", GetLastError())); 2125 2125 #endif 2126 2126 return NULL; … … 2490 2490 { 2491 2491 DWORD LastError = GetLastError(); NOREF(LastError); 2492 AssertMsgFailed(("OpenService failed LastError=%Rwa\n", LastError));2492 AssertMsgFailed(("OpenService failed with LastError=%Rwa\n", LastError)); 2493 2493 } 2494 2494 CloseServiceHandle(hSMgr); … … 2524 2524 { 2525 2525 /* AssertFailed(); */ 2526 LogRel(("usbproxy: Unable to open monitor driver!! (rc=%d)\n", GetLastError()));2526 LogRel(("usbproxy: Unable to open monitor driver!! LastError=%Rwa\n", GetLastError())); 2527 2527 rc = VERR_FILE_NOT_FOUND; 2528 2528 goto failure; … … 2536 2536 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_GET_VERSION, NULL, 0,&version, sizeof(version), &cbReturned, NULL)) 2537 2537 { 2538 LogRel(("usbproxy: Unable to query filter version!! (rc=%d)\n", GetLastError()));2538 LogRel(("usbproxy: Unable to query filter version!! LastError=%Rwa\n", GetLastError())); 2539 2539 rc = VERR_VERSION_MISMATCH; 2540 2540 goto failure; … … 2613 2613 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_CAPTURE_DEVICE, &capture, sizeof(capture), NULL, 0, &cbReturned, NULL)) 2614 2614 { 2615 AssertMsgFailed(("DeviceIoControl failed with %d\n", GetLastError()));2615 AssertMsgFailed(("DeviceIoControl failed with LastError=%Rwa\n", GetLastError())); 2616 2616 return RTErrConvertFromWin32(GetLastError()); 2617 2617 } … … 2644 2644 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_RELEASE_DEVICE, &release, sizeof(release), NULL, 0, &cbReturned, NULL)) 2645 2645 { 2646 AssertMsgFailed(("DeviceIoControl failed with %d\n", GetLastError()));2646 AssertMsgFailed(("DeviceIoControl failed with LastError=%Rwa\n", GetLastError())); 2647 2647 return RTErrConvertFromWin32(GetLastError()); 2648 2648 } … … 2667 2667 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_ADD_FILTER, (LPVOID)pFilter, sizeof(*pFilter), &add_out, sizeof(add_out), &cbReturned, NULL)) 2668 2668 { 2669 AssertMsgFailed(("DeviceIoControl failed with %d\n", GetLastError()));2669 AssertMsgFailed(("DeviceIoControl failed with LastError=%Rwa\n", GetLastError())); 2670 2670 return NULL; 2671 2671 } … … 2691 2691 uId = (uintptr_t)pvId; 2692 2692 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_REMOVE_FILTER, &uId, sizeof(uId), NULL, 0,&cbReturned, NULL)) 2693 AssertMsgFailed(("DeviceIoControl failed with %d\n", GetLastError()));2693 AssertMsgFailed(("DeviceIoControl failed with LastError=%Rwa\n", GetLastError())); 2694 2694 } 2695 2695 … … 2777 2777 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_GET_NUM_DEVICES, NULL, 0, &numdev, sizeof(numdev), &cbReturned, NULL)) 2778 2778 { 2779 AssertMsgFailed(("DeviceIoControl failed with %d\n", GetLastError()));2779 AssertMsgFailed(("DeviceIoControl failed with LastError=%Rwa\n", GetLastError())); 2780 2780 return RTErrConvertFromWin32(GetLastError()); 2781 2781 } … … 2827 2827 if (!DeviceIoControl(hDev, SUPUSB_IOCTL_GET_DEVICE, &dev, sizeof(dev), &dev, sizeof(dev), &cbReturned, NULL)) 2828 2828 { 2829 int iErr = GetLastError();2829 DWORD LastError = GetLastError(); 2830 2830 /* ERROR_DEVICE_NOT_CONNECTED -> device was removed just now */ 2831 AssertMsg( iErr == ERROR_DEVICE_NOT_CONNECTED, ("DeviceIoControl %d failed with %d\n", i, iErr));2831 AssertMsg(LastError == ERROR_DEVICE_NOT_CONNECTED, ("DeviceIoControl %d failed with LastError=%Rwa\n", i, LastError)); 2832 2832 Log(("SUPUSB_IOCTL_GET_DEVICE: DeviceIoControl %d no longer connected\n", i)); 2833 2833 } … … 2856 2856 } 2857 2857 else 2858 AssertMsgFailed(("Unexpected failure to open %s. lasterr=%d\n", pszDevname, GetLastError()));2858 AssertMsgFailed(("Unexpected failure to open %s. LastError=%Rwa\n", pszDevname, GetLastError())); 2859 2859 } 2860 2860
Note:
See TracChangeset
for help on using the changeset viewer.