Index: trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 71213)
+++ trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 71219)
@@ -2635,5 +2635,6 @@
         try
         {
-            pTask = new SessionTaskCopyDirTo(this /* GuestSession */, aSource, aDestination, "" /* strFilter */, fFlags);
+            pTask = new SessionTaskCopyDirTo(this /* GuestSession */, aSource, aDestination, "" /* strFilter */,
+                                             (DirectoryCopyFlags_T)fFlags);
         }
         catch(...)
Index: trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 71213)
+++ trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 71219)
@@ -301,11 +301,10 @@
     int rc = mSession->i_processCreateExInternal(procInfo, pProcess);
 
-    int guestRc;
+    int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
     if (RT_SUCCESS(rc))
     {
         Assert(!pProcess.isNull());
-        rc = pProcess->i_startProcess(msTimeout, &guestRc);
-    }
-
+        rc = pProcess->i_startProcess(msTimeout, &rcGuest);
+    }
     if (RT_FAILURE(rc))
     {
@@ -313,19 +312,15 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    GuestProcess::i_guestErrorToString(guestRc));
+                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                 break;
 
             default:
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr(
-                                    "Error while creating guest process for copying file \"%s\" from guest to host: %Rrc"),
-                                    strSource.c_str(), rc));
+                                    Utf8StrFmt(GuestSession::tr("Error while creating guest process for copying file \"%s\" from guest to host: %Rrc"),
+                                               strSource.c_str(), rc));
                 break;
         }
-    }
-
-    if (RT_FAILURE(rc))
         return rc;
+    }
 
     ProcessWaitResult_T waitRes;
@@ -338,5 +333,5 @@
     for (;;)
     {
-        rc = pProcess->i_waitFor(ProcessWaitForFlag_StdIn, msTimeout, waitRes, &guestRc);
+        rc = pProcess->i_waitFor(ProcessWaitForFlag_StdIn, msTimeout, waitRes, &rcGuest);
         if (   RT_FAILURE(rc)
             || (   waitRes != ProcessWaitResult_StdIn
@@ -401,7 +396,5 @@
         uint32_t cbWritten;
         Assert(sizeof(byBuf) >= cbRead);
-        rc = pProcess->i_writeData(0 /* StdIn */, fFlags,
-                                   byBuf, cbRead,
-                                   msTimeout, &cbWritten, &guestRc);
+        rc = pProcess->i_writeData(0 /* StdIn */, fFlags, byBuf, cbRead, msTimeout, &cbWritten, &rcGuest);
         if (RT_FAILURE(rc))
         {
@@ -409,6 +402,5 @@
             {
                 case VERR_GSTCTL_GUEST_ERROR:
-                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        GuestProcess::i_guestErrorToString(guestRc));
+                    setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                     break;
 
@@ -460,5 +452,5 @@
         || RT_SUCCESS(rc))
     {
-        rc = pProcess->i_waitFor(ProcessWaitForFlag_Terminate, msTimeout, waitRes, &guestRc);
+        rc = pProcess->i_waitFor(ProcessWaitForFlag_Terminate, msTimeout, waitRes, &rcGuest);
         if (   RT_FAILURE(rc)
             || waitRes != ProcessWaitResult_Terminate)
@@ -901,7 +893,7 @@
         || mDest.endsWith("\\"))
     {
-        int guestRc;
+        int rcGuest;
         GuestFsObjData objData;
-        rc = mSession->i_fsQueryInfoInternal(mDest, true /* fFollowSymlinks */, objData, &guestRc);
+        rc = mSession->i_fsQueryInfoInternal(mDest, true /* fFollowSymlinks */, objData, &rcGuest);
         if (RT_SUCCESS(rc))
         {
@@ -924,5 +916,5 @@
                 case VERR_GSTCTL_GUEST_ERROR:
                     setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        GuestProcess::i_guestErrorToString(guestRc));
+                                        GuestProcess::i_guestErrorToString(rcGuest));
                     break;
 
@@ -939,8 +931,7 @@
     {
         if (mSourceFile) /* Use existing file handle. */
-            rc = fileCopyToGuestEx(mSource, mDest, mCopyFileFlags,
-                                   mSourceFile, mSourceOffset, mSourceSize);
+            rc = fileCopyToGuestEx(mSource, mDest, (FileCopyFlag_T)mCopyFileFlags, mSourceFile, mSourceOffset, mSourceSize);
         else
-            rc = fileCopyToGuest(mSource, mDest, mCopyFileFlags);
+            rc = fileCopyToGuest(mSource, mDest, (FileCopyFlag_T)mCopyFileFlags);
 
         if (RT_SUCCESS(rc))
@@ -982,6 +973,7 @@
      ** @todo Use the IGuestFile API for locking down the file on the guest!
      */
-    GuestFsObjData objData; int guestRc;
-    int rc = mSession->i_fileQueryInfoInternal(Utf8Str(mSource), false /*fFollowSymlinks*/, objData, &guestRc);
+    GuestFsObjData objData;
+    int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
+    int rc = mSession->i_fileQueryInfoInternal(Utf8Str(mSource), false /*fFollowSymlinks*/, objData, &rcGuest);
     if (RT_FAILURE(rc))
     {
@@ -1024,5 +1016,5 @@
             rc = mSession->i_processCreateExInternal(procInfo, pProcess);
             if (RT_SUCCESS(rc))
-                rc = pProcess->i_startProcess(msTimeout, &guestRc);
+                rc = pProcess->i_startProcess(msTimeout, &rcGuest);
             if (RT_FAILURE(rc))
             {
@@ -1030,5 +1022,5 @@
                 {
                     case VERR_GSTCTL_GUEST_ERROR:
-                        setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(guestRc));
+                        setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                         break;
 
@@ -1052,5 +1044,5 @@
                 for (;;)
                 {
-                    rc = pProcess->i_waitFor(ProcessWaitForFlag_StdOut, msTimeout, waitRes, &guestRc);
+                    rc = pProcess->i_waitFor(ProcessWaitForFlag_StdOut, msTimeout, waitRes, &rcGuest);
                     if (RT_FAILURE(rc))
                     {
@@ -1058,6 +1050,5 @@
                         {
                             case VERR_GSTCTL_GUEST_ERROR:
-                                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                                    GuestProcess::i_guestErrorToString(guestRc));
+                                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                                 break;
 
@@ -1083,5 +1074,5 @@
                         rc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf),
                                                   msTimeout, byBuf, sizeof(byBuf),
-                                                  &cbRead, &guestRc);
+                                                  &cbRead, &rcGuest);
                         if (RT_FAILURE(rc))
                         {
@@ -1089,6 +1080,5 @@
                             {
                                 case VERR_GSTCTL_GUEST_ERROR:
-                                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                                        GuestProcess::i_guestErrorToString(guestRc));
+                                    setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                                     break;
 
@@ -1139,6 +1129,6 @@
                 } /* for */
 
-                LogFlowThisFunc(("rc=%Rrc, guestrc=%Rrc, waitRes=%ld, cbWrittenTotal=%RU64, cbSize=%RI64, cbToRead=%RU64\n",
-                                 rc, guestRc, waitRes, cbWrittenTotal, objData.mObjectSize, cbToRead));
+                LogFlowThisFunc(("rc=%Rrc, rcGuest=%Rrc, waitRes=%ld, cbWrittenTotal=%RU64, cbSize=%RI64, cbToRead=%RU64\n",
+                                 rc, rcGuest, waitRes, cbWrittenTotal, objData.mObjectSize, cbToRead));
 
                 /*
@@ -1148,5 +1138,5 @@
                     || RT_SUCCESS(rc))
                 {
-                    rc = pProcess->i_waitFor(ProcessWaitForFlag_Terminate, msTimeout, waitRes, &guestRc);
+                    rc = pProcess->i_waitFor(ProcessWaitForFlag_Terminate, msTimeout, waitRes, &rcGuest);
                     if (   RT_FAILURE(rc)
                         || waitRes != ProcessWaitResult_Terminate)
@@ -1392,6 +1382,7 @@
 
         GuestFsObjData objData;
-        int64_t cbSizeOnGuest; int guestRc;
-        rc = pSession->i_fileQuerySizeInternal(strFileDest, false /*fFollowSymlinks*/, &cbSizeOnGuest, &guestRc);
+        int64_t cbSizeOnGuest;
+        int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
+        rc = pSession->i_fileQuerySizeInternal(strFileDest, false /*fFollowSymlinks*/, &cbSizeOnGuest, &rcGuest);
         if (   RT_SUCCESS(rc)
             && cbSize == (uint64_t)cbSizeOnGuest)
@@ -1413,6 +1404,5 @@
                 {
                     case VERR_GSTCTL_GUEST_ERROR:
-                        setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                            GuestProcess::i_guestErrorToString(guestRc));
+                        setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                         break;
 
@@ -1442,10 +1432,11 @@
     LogRel(("Running %s ...\n", procInfo.mName.c_str()));
 
-    GuestProcessTool procTool; int guestRc;
-    int vrc = procTool.Init(pSession, procInfo, false /* Async */, &guestRc);
+    GuestProcessTool procTool;
+    int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
+    int vrc = procTool.Init(pSession, procInfo, false /* Async */, &rcGuest);
     if (RT_SUCCESS(vrc))
     {
-        if (RT_SUCCESS(guestRc))
-            vrc = procTool.i_wait(GUESTPROCESSTOOL_FLAG_NONE, &guestRc);
+        if (RT_SUCCESS(rcGuest))
+            vrc = procTool.i_wait(GUESTPROCESSTOOL_FLAG_NONE, &rcGuest);
         if (RT_SUCCESS(vrc))
             vrc = procTool.i_terminatedOk();
@@ -1463,6 +1454,5 @@
 
             case VERR_GSTCTL_GUEST_ERROR:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    GuestProcess::i_guestErrorToString(guestRc));
+                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                 break;
 
@@ -1704,7 +1694,6 @@
 
             /* Create the installation directory. */
-            int guestRc;
-            rc = pSession->i_directoryCreateInternal(strUpdateDir,
-                                                     755 /* Mode */, DirectoryCreateFlag_Parents, &guestRc);
+            int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
+            rc = pSession->i_directoryCreateInternal(strUpdateDir, 755 /* Mode */, DirectoryCreateFlag_Parents, &rcGuest);
             if (RT_FAILURE(rc))
             {
@@ -1712,6 +1701,5 @@
                 {
                     case VERR_GSTCTL_GUEST_ERROR:
-                        hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                                 GuestProcess::i_guestErrorToString(guestRc));
+                        hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
                         break;
 
