Changeset 24879 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 23, 2009 4:34:12 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r24874 r24879 88 88 * Print out progress on the console 89 89 */ 90 LONGshowProgress(ComPtr<IProgress> progress)90 HRESULT showProgress(ComPtr<IProgress> progress) 91 91 { 92 92 BOOL fCompleted; … … 163 163 164 164 /* complete the line. */ 165 LONG iRc ;165 LONG iRc = E_FAIL; 166 166 if (SUCCEEDED(progress->COMGETTER(ResultCode)(&iRc))) 167 167 { … … 616 616 CHECK_ERROR_BREAK(console, PowerDown(progress.asOutParam())); 617 617 618 showProgress(progress); 619 620 LONG iRc; 621 progress->COMGETTER(ResultCode)(&iRc); 622 if (FAILED(iRc)) 618 rc = showProgress(progress); 619 if (FAILED(rc)) 623 620 { 624 621 com::ProgressErrorInfo info(progress); … … 638 635 CHECK_ERROR_BREAK(console, SaveState(progress.asOutParam())); 639 636 640 showProgress(progress); 641 642 LONG iRc; 643 progress->COMGETTER(ResultCode)(&iRc); 644 if (FAILED(iRc)) 637 rc = showProgress(progress); 638 if (FAILED(rc)) 645 639 { 646 640 com::ProgressErrorInfo info(progress); … … 1331 1325 ComPtr<IProgress> progress; 1332 1326 CHECK_ERROR_BREAK(console, Teleport(bstrHostname, uPort, bstrPassword, uMaxDowntime, progress.asOutParam())); 1333 showProgress(progress); 1334 1335 LONG iRc; 1336 CHECK_ERROR_BREAK(progress, COMGETTER(ResultCode)(&iRc)); 1337 if (FAILED(iRc)) 1327 rc = showProgress(progress); 1328 if (FAILED(rc)) 1338 1329 { 1339 1330 com::ProgressErrorInfo info(progress); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r23902 r24879 148 148 149 149 #ifndef VBOX_ONLY_DOCS 150 LONGshowProgress(ComPtr<IProgress> progress);150 HRESULT showProgress(ComPtr<IProgress> progress); 151 151 #endif 152 152 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r22211 r24879 71 71 CHECK_ERROR(host, CreateHostOnlyNetworkInterface (hif.asOutParam(), progress.asOutParam())); 72 72 73 showProgress(progress); 74 75 HRESULT hr; 76 CHECK_ERROR(progress, COMGETTER(ResultCode) (&hr)); 77 73 rc = showProgress(progress); 78 74 *pcProcessed = index - iStart; 79 80 if(FAILED(hr)) 75 if (FAILED(rc)) 81 76 { 82 77 com::ProgressErrorInfo info(progress); … … 84 79 RTPrintf("Error: failed to create the host-only adapter. Error message: %lS\n", info.getText().raw()); 85 80 else 86 RTPrintf("Error: failed to create the host-only adapter. No error message available, HRESULT code: 0x%x\n", hr);81 RTPrintf("Error: failed to create the host-only adapter. No error message available, HRESULT code: 0x%x\n", rc); 87 82 88 83 return 1; … … 120 115 CHECK_ERROR(host, RemoveHostOnlyNetworkInterface (guid, progress.asOutParam())); 121 116 122 showProgress(progress); 123 124 HRESULT hr; 125 CHECK_ERROR(progress, COMGETTER(ResultCode) (&hr)); 126 117 rc = showProgress(progress); 127 118 *pcProcessed = index - iStart; 128 129 if(FAILED(hr)) 119 if (FAILED(rc)) 130 120 { 131 121 com::ProgressErrorInfo info(progress); … … 133 123 RTPrintf("Error: failed to remove the host-only adapter. Error message: %lS\n", info.getText().raw()); 134 124 else 135 RTPrintf("Error: failed to remove the host-only adapter. No error message available, HRESULT code: 0x%x\n", hr);125 RTPrintf("Error: failed to remove the host-only adapter. No error message available, HRESULT code: 0x%x\n", rc); 136 126 137 127 return 1; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
r24084 r24879 314 314 CHECK_ERROR_BREAK(console, TakeSnapshot(name, desc, progress.asOutParam())); 315 315 316 showProgress(progress); 317 LONG iRc; 318 progress->COMGETTER(ResultCode)(&iRc); 319 rc = iRc; 316 rc = showProgress(progress); 320 317 if (FAILED(rc)) 321 318 { … … 378 375 } 379 376 380 showProgress(pProgress); 381 LONG iRc; 382 pProgress->COMGETTER(ResultCode)(&iRc); 383 rc = iRc; 377 rc = showProgress(pProgress); 384 378 if (FAILED(rc)) 385 379 {
Note:
See TracChangeset
for help on using the changeset viewer.