Changeset 95142 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 31, 2022 9:36:29 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151633
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp
r94660 r95142 87 87 #define CHECK_ERROR_L(iface, method) \ 88 88 do { \ 89 rc = iface->method; \89 hrc = iface->method; \ 90 90 if (FAILED(rc)) \ 91 91 RTPrintf("warning: %s->%s failed on line %u with hrc=%Rhrc\n", #iface, #method, __LINE__, rc);\ … … 100 100 static int tstStartVM(IVirtualBox *pVBox, ISession *pSession, Bstr machineID, bool fSkipUnlock) 101 101 { 102 HRESULT rc;102 HRESULT hrc; 103 103 ComPtr<IProgress> progress; 104 104 ComPtr<IMachine> machine; 105 105 Bstr machineName; 106 106 107 rc = TST_COM_EXPR(pVBox->FindMachine(machineID.raw(), machine.asOutParam()));108 if(SUCCEEDED( rc))109 rc = TST_COM_EXPR(machine->COMGETTER(Name)(machineName.asOutParam()));110 if(SUCCEEDED( rc))111 { 112 rc = machine->LaunchVMProcess(pSession, Bstr("headless").raw(),107 hrc = TST_COM_EXPR(pVBox->FindMachine(machineID.raw(), machine.asOutParam())); 108 if(SUCCEEDED(hrc)) 109 hrc = TST_COM_EXPR(machine->COMGETTER(Name)(machineName.asOutParam())); 110 if(SUCCEEDED(hrc)) 111 { 112 hrc = machine->LaunchVMProcess(pSession, Bstr("headless").raw(), 113 113 ComSafeArrayNullInParam(), progress.asOutParam()); 114 114 } 115 if (SUCCEEDED( rc) && !progress.isNull())115 if (SUCCEEDED(hrc) && !progress.isNull()) 116 116 { 117 117 CHECK_ERROR_L(progress, WaitForCompletion(-1)); 118 if (SUCCEEDED( rc))118 if (SUCCEEDED(hrc)) 119 119 { 120 120 BOOL completed = true; 121 121 CHECK_ERROR_L(progress, COMGETTER(Completed)(&completed)); 122 if (SUCCEEDED( rc))122 if (SUCCEEDED(hrc)) 123 123 { 124 124 Assert(completed); 125 125 LONG iRc; 126 126 CHECK_ERROR_L(progress, COMGETTER(ResultCode)(&iRc)); 127 if (SUCCEEDED( rc))127 if (SUCCEEDED(hrc)) 128 128 { 129 129 if (FAILED(iRc)) … … 142 142 RTPrintf("Session unlock skipped.\n"); 143 143 } 144 return rc;144 return hrc; 145 145 } 146 146
Note:
See TracChangeset
for help on using the changeset viewer.