Changeset 83803 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/win/testcase
- Timestamp:
- Apr 18, 2020 6:20:34 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137329
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/testcase/USBTest.cpp
r82968 r83803 79 79 int rc = -1; 80 80 SC_HANDLE hSMgr = OpenSCManager(NULL, NULL, SERVICE_STOP | SERVICE_QUERY_STATUS); 81 DWORD LastError = GetLastError(); NOREF(LastError); 82 AssertMsg(hSMgr, ("OpenSCManager(,,delete) failed rc=%d\n", LastError)); 81 AssertMsg(hSMgr, ("OpenSCManager(,,delete) failed rc=%d\n", GetLastError())); 83 82 if (hSMgr) 84 83 { … … 107 106 } 108 107 else 109 { 110 DWORD LastError = GetLastError(); NOREF(LastError); 111 AssertMsgFailed(("ControlService failed with LastError=%Rwa. status=%d\n", LastError, Status.dwCurrentState)); 112 } 108 AssertMsgFailed(("ControlService failed with LastError=%Rwa. status=%d\n", GetLastError(), Status.dwCurrentState)); 113 109 CloseServiceHandle(hService); 114 110 } … … 116 112 rc = 0; 117 113 else 118 { 119 DWORD LastError = GetLastError(); NOREF(LastError); 120 AssertMsgFailed(("OpenService failed LastError=%Rwa\n", LastError)); 121 } 114 AssertMsgFailed(("OpenService failed LastError=%Rwa\n", GetLastError())); 122 115 CloseServiceHandle(hSMgr); 123 116 } 124 117 return rc; 125 118 } 119 126 120 /** 127 121 * Release specified USB device to the host. … … 265 259 { 266 260 /* AssertFailed(); */ 267 printf("usbproxy: Unable to open filter driver!! (rc=% d)\n", GetLastError());261 printf("usbproxy: Unable to open filter driver!! (rc=%lu)\n", GetLastError()); 268 262 rc = VERR_FILE_NOT_FOUND; 269 263 goto failure; … … 277 271 if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_GET_VERSION, NULL, 0,&version, sizeof(version), &cbReturned, NULL)) 278 272 { 279 printf("usbproxy: Unable to query filter version!! (rc=% d)\n", GetLastError());273 printf("usbproxy: Unable to query filter version!! (rc=%lu)\n", GetLastError()); 280 274 rc = VERR_VERSION_MISMATCH; 281 275 goto failure;
Note:
See TracChangeset
for help on using the changeset viewer.