Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 24878)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 24879)
@@ -88,5 +88,5 @@
  * Print out progress on the console
  */
-LONG showProgress(ComPtr<IProgress> progress)
+HRESULT showProgress(ComPtr<IProgress> progress)
 {
     BOOL fCompleted;
@@ -163,5 +163,5 @@
 
     /* complete the line. */
-    LONG iRc;
+    LONG iRc = E_FAIL;
     if (SUCCEEDED(progress->COMGETTER(ResultCode)(&iRc)))
     {
@@ -616,9 +616,6 @@
             CHECK_ERROR_BREAK(console, PowerDown(progress.asOutParam()));
 
-            showProgress(progress);
-
-            LONG iRc;
-            progress->COMGETTER(ResultCode)(&iRc);
-            if (FAILED(iRc))
+            rc = showProgress(progress);
+            if (FAILED(rc))
             {
                 com::ProgressErrorInfo info(progress);
@@ -638,9 +635,6 @@
             CHECK_ERROR_BREAK(console, SaveState(progress.asOutParam()));
 
-            showProgress(progress);
-
-            LONG iRc;
-            progress->COMGETTER(ResultCode)(&iRc);
-            if (FAILED(iRc))
+            rc = showProgress(progress);
+            if (FAILED(rc))
             {
                 com::ProgressErrorInfo info(progress);
@@ -1331,9 +1325,6 @@
             ComPtr<IProgress> progress;
             CHECK_ERROR_BREAK(console, Teleport(bstrHostname, uPort, bstrPassword, uMaxDowntime, progress.asOutParam()));
-            showProgress(progress);
-
-            LONG iRc;
-            CHECK_ERROR_BREAK(progress, COMGETTER(ResultCode)(&iRc));
-            if (FAILED(iRc))
+            rc = showProgress(progress);
+            if (FAILED(rc))
             {
                 com::ProgressErrorInfo info(progress);
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 24878)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 24879)
@@ -148,5 +148,5 @@
 
 #ifndef VBOX_ONLY_DOCS
-LONG showProgress(ComPtr<IProgress> progress);
+HRESULT showProgress(ComPtr<IProgress> progress);
 #endif
 
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp	(revision 24878)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp	(revision 24879)
@@ -71,12 +71,7 @@
     CHECK_ERROR(host, CreateHostOnlyNetworkInterface (hif.asOutParam(), progress.asOutParam()));
 
-    showProgress(progress);
-
-    HRESULT hr;
-    CHECK_ERROR(progress, COMGETTER(ResultCode) (&hr));
-
+    rc = showProgress(progress);
     *pcProcessed = index - iStart;
-
-    if(FAILED(hr))
+    if (FAILED(rc))
     {
         com::ProgressErrorInfo info(progress);
@@ -84,5 +79,5 @@
             RTPrintf("Error: failed to create the host-only adapter. Error message: %lS\n", info.getText().raw());
         else
-            RTPrintf("Error: failed to create the host-only adapter. No error message available, HRESULT code: 0x%x\n", hr);
+            RTPrintf("Error: failed to create the host-only adapter. No error message available, HRESULT code: 0x%x\n", rc);
 
         return 1;
@@ -120,12 +115,7 @@
     CHECK_ERROR(host, RemoveHostOnlyNetworkInterface (guid, progress.asOutParam()));
 
-    showProgress(progress);
-
-    HRESULT hr;
-    CHECK_ERROR(progress, COMGETTER(ResultCode) (&hr));
-
+    rc = showProgress(progress);
     *pcProcessed = index - iStart;
-
-    if(FAILED(hr))
+    if (FAILED(rc))
     {
         com::ProgressErrorInfo info(progress);
@@ -133,5 +123,5 @@
             RTPrintf("Error: failed to remove the host-only adapter. Error message: %lS\n", info.getText().raw());
         else
-            RTPrintf("Error: failed to remove the host-only adapter. No error message available, HRESULT code: 0x%x\n", hr);
+            RTPrintf("Error: failed to remove the host-only adapter. No error message available, HRESULT code: 0x%x\n", rc);
 
         return 1;
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp	(revision 24878)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp	(revision 24879)
@@ -314,8 +314,5 @@
             CHECK_ERROR_BREAK(console, TakeSnapshot(name, desc, progress.asOutParam()));
 
-            showProgress(progress);
-            LONG iRc;
-            progress->COMGETTER(ResultCode)(&iRc);
-            rc = iRc;
+            rc = showProgress(progress);
             if (FAILED(rc))
             {
@@ -378,8 +375,5 @@
             }
 
-            showProgress(pProgress);
-            LONG iRc;
-            pProgress->COMGETTER(ResultCode)(&iRc);
-            rc = iRc;
+            rc = showProgress(pProgress);
             if (FAILED(rc))
             {
