Index: trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 98289)
@@ -713,7 +713,7 @@
         hrc = explorer->init(li.storageType, li.strPath, li.strHostname, li.strUsername, li.strPassword, mVirtualBox);
     }
-    catch (HRESULT aRC)
-    {
-        hrc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        hrc = hrcXcpt;
     }
 
@@ -767,5 +767,5 @@
         *aCreated = i;
     }
-    catch (HRESULT aRC)
+    catch (HRESULT hrcXcpt)
     {
         for (; i>0; --i)
@@ -776,5 +776,5 @@
                 break;
         }
-        hrc = aRC;
+        hrc = hrcXcpt;
     }
 
Index: trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 98289)
@@ -726,7 +726,7 @@
             hrc = i_writeCloudImpl(m->locInfo, progress);
         }
-        catch (HRESULT aRC)
-        {
-            hrc = aRC;
+        catch (HRESULT hrcXcpt)
+        {
+            hrc = hrcXcpt;
         }
 
@@ -816,7 +816,7 @@
 
         }
-        catch (HRESULT aRC)
-        {
-            hrc = aRC;
+        catch (HRESULT hrcXcpt)
+        {
+            hrc = hrcXcpt;
         }
 
@@ -2816,7 +2816,7 @@
         hrc = setError(VBOX_E_FILE_ERROR, x.what());
     }
-    catch (HRESULT aRC)
-    {
-        hrc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        hrc = hrcXcpt;
     }
 
Index: trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 98289)
@@ -106,7 +106,7 @@
         i_parseURI(aFile, m->locInfo); /* may throw hrc. */
     }
-    catch (HRESULT aRC)
-    {
-        return aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        return hrcXcpt;
     }
     catch (std::bad_alloc &)
@@ -795,9 +795,9 @@
         }
     }
-    catch (HRESULT aRC)
+    catch (HRESULT hrcXcpt)
     {
         /* On error we clear the list & return */
         m->virtualSystemDescriptions.clear();
-        hrc = aRC;
+        hrc = hrcXcpt;
     }
 
@@ -2572,7 +2572,7 @@
         hrc = setError(VBOX_E_FILE_ERROR, rXcpt.what());
     }
-    catch (HRESULT aRC)
-    {
-        hrc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        hrc = hrcXcpt;
     }
     catch (...)
@@ -4865,5 +4865,5 @@
             stack.fSessionOpen = false;
         }
-        catch(HRESULT aRC)
+        catch (HRESULT hrcXcpt)
         {
             com::ErrorInfo info;
@@ -4873,7 +4873,7 @@
 
             if (info.isFullAvailable())
-                throw setError(aRC, Utf8Str(info.getText()).c_str());
+                throw setError(hrcXcpt, Utf8Str(info.getText()).c_str());
             else
-                throw setError(aRC, tr("Unknown error during OVF import"));
+                throw setError(hrcXcpt, tr("Unknown error during OVF import"));
         }
     }
@@ -5217,5 +5217,5 @@
             stack.fSessionOpen = false;
         }
-        catch(HRESULT aRC)
+        catch (HRESULT hrcXcpt)
         {
             com::ErrorInfo info;
@@ -5224,7 +5224,7 @@
 
             if (info.isFullAvailable())
-                throw setError(aRC, Utf8Str(info.getText()).c_str());
+                throw setError(hrcXcpt, Utf8Str(info.getText()).c_str());
             else
-                throw setError(aRC, tr("Unknown error during OVF import"));
+                throw setError(hrcXcpt, tr("Unknown error during OVF import"));
         }
     }
Index: trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp	(revision 98289)
@@ -50,12 +50,10 @@
     HRESULT add(const Utf8Str &folder, const Utf8Str &file)
     {
-        HRESULT rc = S_OK;
         m_list.insert(std::make_pair(folder, file));
-        return rc;
+        return S_OK;
     }
 
     HRESULT add(const Utf8Str &fullPath)
     {
-        HRESULT rc = S_OK;
         Utf8Str folder = fullPath;
         folder.stripFilename();
@@ -63,10 +61,9 @@
         filename.stripPath();
         m_list.insert(std::make_pair(folder, filename));
-        return rc;
+        return S_OK;
     }
 
     HRESULT removeFileFromList(const Utf8Str &fullPath)
     {
-        HRESULT rc = S_OK;
         Utf8Str folder = fullPath;
         folder.stripFilename();
@@ -86,10 +83,9 @@
         }
 
-        return rc;
+        return S_OK;
     }
 
     HRESULT removeFileFromList(const Utf8Str &path, const Utf8Str &fileName)
     {
-        HRESULT rc = S_OK;
         rangeRes_t res = m_list.equal_range(path);
         for (it_t it=res.first; it!=res.second;)
@@ -104,12 +100,11 @@
                 ++it;
         }
-        return rc;
+        return S_OK;
     }
 
     HRESULT removeFolderFromList(const Utf8Str &path)
     {
-        HRESULT rc = S_OK;
         m_list.erase(path);
-        return rc;
+        return S_OK;
     }
 
@@ -590,11 +585,11 @@
 
     BOOL fCanceled = false;
-    HRESULT rc = pProgress->COMGETTER(Canceled)(&fCanceled);
-    if (FAILED(rc)) return VERR_GENERAL_FAILURE;
+    HRESULT hrc = pProgress->COMGETTER(Canceled)(&fCanceled);
+    if (FAILED(hrc)) return VERR_GENERAL_FAILURE;
     /* If canceled by the user tell it to the copy operation. */
     if (fCanceled) return VERR_CANCELLED;
     /* Set the new process. */
-    rc = pProgress->SetCurrentOperationProgress(uPercentage);
-    if (FAILED(rc)) return VERR_GENERAL_FAILURE;
+    hrc = pProgress->SetCurrentOperationProgress(uPercentage);
+    if (FAILED(hrc)) return VERR_GENERAL_FAILURE;
 
     return VINF_SUCCESS;
@@ -1141,5 +1136,5 @@
                                     const Utf8Str &strTargetFolder)
 {
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     ComObjPtr<Machine> &machine = m_pMachine;
     Utf8Str strLocation;
@@ -1158,12 +1153,12 @@
             Bstr bstrSrcName;
 
-            rc = pMedium->COMGETTER(Name)(bstrSrcName.asOutParam());
-            if (FAILED(rc)) throw rc;
+            hrc = pMedium->COMGETTER(Name)(bstrSrcName.asOutParam());
+            if (FAILED(hrc)) throw hrc;
 
             if (strTargetFolder.isNotEmpty())
             {
                 strTargetImageName = strTargetFolder;
-                rc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
-                if (FAILED(rc)) throw rc;
+                hrc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
+                if (FAILED(hrc)) throw hrc;
                 strLocation = bstrLocation;
 
@@ -1174,16 +1169,12 @@
 
                 strTargetImageName.append(RTPATH_DELIMITER).append(strLocation);
-                rc = m_pProgress->SetNextOperation(BstrFmt(tr("Moving medium '%ls' ..."),
-                                                           bstrSrcName.raw()).raw(),
-                                                   mt.uWeight);
-                if (FAILED(rc)) throw rc;
+                hrc = m_pProgress->SetNextOperation(BstrFmt(tr("Moving medium '%ls' ..."), bstrSrcName.raw()).raw(), mt.uWeight);
+                if (FAILED(hrc)) throw hrc;
             }
             else
             {
                 strTargetImageName = mt.strBaseName;//Should contain full path to the image
-                rc = m_pProgress->SetNextOperation(BstrFmt(tr("Moving medium '%ls' back..."),
-                                                           bstrSrcName.raw()).raw(),
-                                                   mt.uWeight);
-                if (FAILED(rc)) throw rc;
+                hrc = m_pProgress->SetNextOperation(BstrFmt(tr("Moving medium '%ls' back..."), bstrSrcName.raw()).raw(), mt.uWeight);
+                if (FAILED(hrc)) throw hrc;
             }
 
@@ -1196,10 +1187,10 @@
 
             MediumType_T mediumType;//immutable, shared, passthrough
-            rc = pMedium->COMGETTER(Type)(&mediumType);
-            if (FAILED(rc)) throw rc;
+            hrc = pMedium->COMGETTER(Type)(&mediumType);
+            if (FAILED(hrc)) throw hrc;
 
             DeviceType_T deviceType;//floppy, hard, DVD
-            rc = pMedium->COMGETTER(DeviceType)(&deviceType);
-            if (FAILED(rc)) throw rc;
+            hrc = pMedium->COMGETTER(DeviceType)(&deviceType);
+            if (FAILED(hrc)) throw hrc;
 
             /* Drop lock early because IMedium::MoveTo needs to get the VirtualBox one. */
@@ -1207,6 +1198,6 @@
 
             ComPtr<IProgress> moveDiskProgress;
-            rc = pMedium->MoveTo(bstrLocation.raw(), moveDiskProgress.asOutParam());
-            if (SUCCEEDED(rc))
+            hrc = pMedium->MoveTo(bstrLocation.raw(), moveDiskProgress.asOutParam());
+            if (SUCCEEDED(hrc))
             {
                 /* In case of failure moveDiskProgress would be in the invalid state or not initialized at all
@@ -1214,5 +1205,5 @@
                  */
                 /* Wait until the other process has finished. */
-                rc = m_pProgress->WaitForOtherProgressCompletion(moveDiskProgress, 0 /* indefinite wait */);
+                hrc = m_pProgress->WaitForOtherProgressCompletion(moveDiskProgress, 0 /* indefinite wait */);
             }
 
@@ -1220,5 +1211,5 @@
             machineLock.acquire();
 
-            if (FAILED(rc)) throw rc;
+            if (FAILED(hrc)) throw hrc;
 
             Log2(("Moving %s has been finished\n", strTargetImageName.c_str()));
@@ -1229,18 +1220,18 @@
         machineLock.release();
     }
-    catch(HRESULT hrc)
+    catch (HRESULT hrcXcpt)
+    {
+        Log2(("Exception during moving the disk %s: %Rhrc\n", strLocation.c_str(), hrcXcpt));
+        hrc = hrcXcpt;
+        machineLock.release();
+    }
+    catch (...)
     {
         Log2(("Exception during moving the disk %s\n", strLocation.c_str()));
-        rc = hrc;
+        hrc = VirtualBoxBase::handleUnexpectedExceptions(m_pMachine, RT_SRC_POS);
         machineLock.release();
     }
-    catch (...)
-    {
-        Log2(("Exception during moving the disk %s\n", strLocation.c_str()));
-        rc = VirtualBoxBase::handleUnexpectedExceptions(m_pMachine, RT_SRC_POS);
-        machineLock.release();
-    }
-
-    return rc;
+
+    return hrc;
 }
 
@@ -1248,6 +1239,6 @@
 {
     ComObjPtr<Snapshot> pSnapshot;
-    HRESULT rc = m_pMachine->i_findSnapshotById(Guid() /* zero */, pSnapshot, true);
-    if (SUCCEEDED(rc) && !pSnapshot.isNull())
+    HRESULT hrc = m_pMachine->i_findSnapshotById(Guid() /* zero */, pSnapshot, true);
+    if (SUCCEEDED(hrc) && !pSnapshot.isNull())
         pSnapshot->i_updateSavedStatePaths(sourcePath.c_str(),
                                            targetPath.c_str());
@@ -1269,6 +1260,6 @@
 {
     ComObjPtr<Snapshot> pSnapshot;
-    HRESULT rc = m_pMachine->i_findSnapshotById(Guid() /* zero */, pSnapshot, true);
-    if (SUCCEEDED(rc) && !pSnapshot.isNull())
+    HRESULT hrc = m_pMachine->i_findSnapshotById(Guid() /* zero */, pSnapshot, true);
+    if (SUCCEEDED(hrc) && !pSnapshot.isNull())
         pSnapshot->i_updateNVRAMPaths(sourcePath.c_str(),
                                       targetPath.c_str());
@@ -1413,11 +1404,11 @@
 {
     ComPtr<IMedium> pBaseMedium;
-    HRESULT rc = pMedium->COMGETTER(Base)(pBaseMedium.asOutParam());
-    if (FAILED(rc)) return rc;
+    HRESULT hrc = pMedium->COMGETTER(Base)(pBaseMedium.asOutParam());
+    if (FAILED(hrc)) return hrc;
     Bstr bstrBaseName;
-    rc = pBaseMedium->COMGETTER(Name)(bstrBaseName.asOutParam());
-    if (FAILED(rc)) return rc;
+    hrc = pBaseMedium->COMGETTER(Name)(bstrBaseName.asOutParam());
+    if (FAILED(hrc)) return hrc;
     strBaseName = bstrBaseName;
-    return rc;
+    return hrc;
 }
 
@@ -1425,22 +1416,22 @@
 {
     Bstr name;
-    HRESULT rc = pSnapshot->COMGETTER(Name)(name.asOutParam());
-    if (FAILED(rc)) return rc;
+    HRESULT hrc = pSnapshot->COMGETTER(Name)(name.asOutParam());
+    if (FAILED(hrc)) return hrc;
 
     ComPtr<IMachine> l_pMachine;
-    rc = pSnapshot->COMGETTER(Machine)(l_pMachine.asOutParam());
-    if (FAILED(rc)) return rc;
+    hrc = pSnapshot->COMGETTER(Machine)(l_pMachine.asOutParam());
+    if (FAILED(hrc)) return hrc;
     machineList.push_back((Machine*)(IMachine*)l_pMachine);
 
     SafeIfaceArray<ISnapshot> sfaChilds;
-    rc = pSnapshot->COMGETTER(Children)(ComSafeArrayAsOutParam(sfaChilds));
-    if (FAILED(rc)) return rc;
+    hrc = pSnapshot->COMGETTER(Children)(ComSafeArrayAsOutParam(sfaChilds));
+    if (FAILED(hrc)) return hrc;
     for (size_t i = 0; i < sfaChilds.size(); ++i)
     {
-        rc = createMachineList(sfaChilds[i]);
-        if (FAILED(rc)) return rc;
-    }
-
-    return rc;
+        hrc = createMachineList(sfaChilds[i]);
+        if (FAILED(hrc)) return hrc;
+    }
+
+    return hrc;
 }
 
@@ -1450,5 +1441,5 @@
      * adding all directly and indirectly attached disk images to the worker
      * list. */
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     for (size_t i = 0; i < machineList.size(); ++i)
     {
@@ -1458,17 +1449,17 @@
          * machines to a worker list. */
         SafeIfaceArray<IMediumAttachment> sfaAttachments;
-        rc = machine->COMGETTER(MediumAttachments)(ComSafeArrayAsOutParam(sfaAttachments));
-        if (FAILED(rc)) return rc;
+        hrc = machine->COMGETTER(MediumAttachments)(ComSafeArrayAsOutParam(sfaAttachments));
+        if (FAILED(hrc)) return hrc;
         for (size_t a = 0; a < sfaAttachments.size(); ++a)
         {
             const ComPtr<IMediumAttachment> &pAtt = sfaAttachments[a];
             DeviceType_T deviceType;//floppy, hard, DVD
-            rc = pAtt->COMGETTER(Type)(&deviceType);
-            if (FAILED(rc)) return rc;
+            hrc = pAtt->COMGETTER(Type)(&deviceType);
+            if (FAILED(hrc)) return hrc;
 
             /* Valid medium attached? */
             ComPtr<IMedium> pMedium;
-            rc = pAtt->COMGETTER(Medium)(pMedium.asOutParam());
-            if (FAILED(rc)) return rc;
+            hrc = pAtt->COMGETTER(Medium)(pMedium.asOutParam());
+            if (FAILED(hrc)) return hrc;
 
             if (pMedium.isNull())
@@ -1476,6 +1467,6 @@
 
             Bstr bstrLocation;
-            rc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
-            if (FAILED(rc)) return rc;
+            hrc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
+            if (FAILED(hrc)) return hrc;
 
             /* Cast to ComObjPtr<Medium> */
@@ -1483,15 +1474,11 @@
 
             /* Check for "read-only" medium in terms that VBox can't create this one */
-            rc = isMediumTypeSupportedForMoving(pMedium);
-            if (FAILED(rc))
-            {
-                if (rc == S_FALSE)
-                {
-                    Log2(("Skipping file %ls because of this medium type hasn't been supported for moving.\n",
-                          bstrLocation.raw()));
-                    continue;
-                }
-                else
-                    return rc;
+            hrc = isMediumTypeSupportedForMoving(pMedium);
+            if (FAILED(hrc))
+            {
+                if (hrc != S_FALSE)
+                    return hrc;
+                Log2(("Skipping file %ls because of this medium type hasn't been supported for moving.\n", bstrLocation.raw()));
+                continue;
             }
 
@@ -1505,17 +1492,17 @@
                 /* Refresh the state so that the file size get read. */
                 MediumState_T e;
-                rc = pMedium->RefreshState(&e);
-                if (FAILED(rc)) return rc;
+                hrc = pMedium->RefreshState(&e);
+                if (FAILED(hrc)) return hrc;
 
                 LONG64 lSize;
-                rc = pMedium->COMGETTER(Size)(&lSize);
-                if (FAILED(rc)) return rc;
+                hrc = pMedium->COMGETTER(Size)(&lSize);
+                if (FAILED(hrc)) return hrc;
 
                 MediumType_T mediumType;//immutable, shared, passthrough
-                rc = pMedium->COMGETTER(Type)(&mediumType);
-                if (FAILED(rc)) return rc;
-
-                rc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
-                if (FAILED(rc)) return rc;
+                hrc = pMedium->COMGETTER(Type)(&mediumType);
+                if (FAILED(hrc)) return hrc;
+
+                hrc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
+                if (FAILED(hrc)) return hrc;
 
                 MEDIUMTASKMOVE mt;// = {false, "basename", NULL, 0, 0};
@@ -1534,6 +1521,6 @@
 
                 /* Query next parent. */
-                rc = pMedium->COMGETTER(Parent)(pMedium.asOutParam());
-                if (FAILED(rc)) return rc;
+                hrc = pMedium->COMGETTER(Parent)(pMedium.asOutParam());
+                if (FAILED(hrc)) return hrc;
             }
 
@@ -1542,10 +1529,10 @@
 
         /* Add the save state files of this machine if there is one. */
-        rc = addSaveState(machine);
-        if (FAILED(rc)) return rc;
+        hrc = addSaveState(machine);
+        if (FAILED(hrc)) return hrc;
 
         /* Add the NVRAM files of this machine if there is one. */
-        rc = addNVRAM(machine);
-        if (FAILED(rc)) return rc;
+        hrc = addNVRAM(machine);
+        if (FAILED(hrc)) return hrc;
     }
 
@@ -1561,5 +1548,5 @@
     }
 
-    return rc;
+    return hrc;
 }
 
@@ -1567,6 +1554,6 @@
 {
     Bstr bstrSrcSaveStatePath;
-    HRESULT rc = machine->COMGETTER(StateFilePath)(bstrSrcSaveStatePath.asOutParam());
-    if (FAILED(rc)) return rc;
+    HRESULT hrc = machine->COMGETTER(StateFilePath)(bstrSrcSaveStatePath.asOutParam());
+    if (FAILED(hrc)) return hrc;
     if (!bstrSrcSaveStatePath.isEmpty())
     {
@@ -1595,9 +1582,9 @@
 {
     ComPtr<INvramStore> pNvramStore;
-    HRESULT rc = machine->COMGETTER(NonVolatileStore)(pNvramStore.asOutParam());
-    if (FAILED(rc)) return rc;
+    HRESULT hrc = machine->COMGETTER(NonVolatileStore)(pNvramStore.asOutParam());
+    if (FAILED(hrc)) return hrc;
     Bstr bstrSrcNVRAMPath;
-    rc = pNvramStore->COMGETTER(NonVolatileStorageFile)(bstrSrcNVRAMPath.asOutParam());
-    if (FAILED(rc)) return rc;
+    hrc = pNvramStore->COMGETTER(NonVolatileStorageFile)(bstrSrcNVRAMPath.asOutParam());
+    if (FAILED(hrc)) return hrc;
     Utf8Str strSrcNVRAMPath(bstrSrcNVRAMPath);
     if (!strSrcNVRAMPath.isEmpty() && RTFileExists(strSrcNVRAMPath.c_str()))
@@ -1652,23 +1639,23 @@
 {
     Bstr bstrLocation;
-    HRESULT rc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
-    if (FAILED(rc))
-        return rc;
+    HRESULT hrc = pMedium->COMGETTER(Location)(bstrLocation.asOutParam());
+    if (FAILED(hrc))
+        return hrc;
 
     DeviceType_T deviceType;
-    rc = pMedium->COMGETTER(DeviceType)(&deviceType);
-    if (FAILED(rc))
-        return rc;
+    hrc = pMedium->COMGETTER(DeviceType)(&deviceType);
+    if (FAILED(hrc))
+        return hrc;
 
     ComPtr<IMediumFormat> mediumFormat;
-    rc = pMedium->COMGETTER(MediumFormat)(mediumFormat.asOutParam());
-    if (FAILED(rc))
-        return rc;
+    hrc = pMedium->COMGETTER(MediumFormat)(mediumFormat.asOutParam());
+    if (FAILED(hrc))
+        return hrc;
 
     /* Check whether VBox is able to create this medium format or not, i.e. medium can be "read-only" */
     Bstr bstrFormatName;
-    rc = mediumFormat->COMGETTER(Name)(bstrFormatName.asOutParam());
-    if (FAILED(rc))
-        return rc;
+    hrc = mediumFormat->COMGETTER(Name)(bstrFormatName.asOutParam());
+    if (FAILED(hrc))
+        return hrc;
 
     Utf8Str formatName = Utf8Str(bstrFormatName);
Index: trunk/src/VBox/Main/src-server/MediumIOImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/MediumIOImpl.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/MediumIOImpl.cpp	(revision 98289)
@@ -115,8 +115,8 @@
           mVirtualBoxCaller(NULL)
     {
-        AssertReturnVoidStmt(pMediumIO, mRC = E_FAIL);
-        AssertReturnVoidStmt(pDataStream, mRC = E_FAIL);
-        mRC = mMediumCaller.hrc();
-        if (FAILED(mRC))
+        AssertReturnVoidStmt(pMediumIO, mHrc = E_FAIL);
+        AssertReturnVoidStmt(pDataStream, mHrc = E_FAIL);
+        mHrc = mMediumCaller.hrc();
+        if (FAILED(mHrc))
             return;
 
@@ -125,6 +125,6 @@
         mVirtualBox = pVirtualBox;
         mVirtualBoxCaller.attach(pVirtualBox);
-        mRC = mVirtualBoxCaller.hrc();
-        if (FAILED(mRC))
+        mHrc = mVirtualBoxCaller.hrc();
+        if (FAILED(mHrc))
             return;
     }
@@ -136,8 +136,8 @@
         if (   isAsync()
             && !mProgress.isNull())
-            mProgress->i_notifyComplete(mRC);
-    }
-
-    HRESULT hrc() const { return mRC; }
+            mProgress->i_notifyComplete(mHrc);
+    }
+
+    HRESULT hrc() const { return mHrc; }
     bool isOk() const { return SUCCEEDED(hrc()); }
 
@@ -153,6 +153,6 @@
         try
         {
-            mRC = executeTask(); /* (destructor picks up mRC, see above) */
-            LogFlowFunc(("hrc=%Rhrc\n", mRC));
+            mHrc = executeTask(); /* (destructor picks up mHrc, see above) */
+            LogFlowFunc(("hrc=%Rhrc\n", mHrc));
         }
         catch (...)
@@ -168,5 +168,5 @@
 
 protected:
-    HRESULT         mRC;
+    HRESULT         mHrc;
 
     ComObjPtr<DataStream> m_pDataStream;
@@ -843,5 +843,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
Index: trunk/src/VBox/Main/src-server/MediumImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 98289)
@@ -308,7 +308,7 @@
           mNotifyAboutChanges(fNotifyAboutChanges)
     {
-        AssertReturnVoidStmt(aMedium, mRC = E_FAIL);
-        mRC = mMediumCaller.hrc();
-        if (FAILED(mRC))
+        AssertReturnVoidStmt(aMedium, mHrc = E_FAIL);
+        mHrc = mMediumCaller.hrc();
+        if (FAILED(mHrc))
             return;
 
@@ -317,6 +317,6 @@
         mVirtualBox = pVirtualBox;
         mVirtualBoxCaller.attach(pVirtualBox);
-        mRC = mVirtualBoxCaller.hrc();
-        if (FAILED(mRC))
+        mHrc = mVirtualBoxCaller.hrc();
+        if (FAILED(mHrc))
             return;
 
@@ -334,5 +334,5 @@
             AssertRC(vrc);
             if (RT_FAILURE(vrc))
-                mRC = E_FAIL;
+                mHrc = E_FAIL;
         }
     }
@@ -344,8 +344,8 @@
         if (   isAsync()
             && !mProgress.isNull())
-            mProgress->i_notifyComplete(mRC);
-    }
-
-    HRESULT hrc() const { return mRC; }
+            mProgress->i_notifyComplete(mHrc);
+    }
+
+    HRESULT hrc() const { return mHrc; }
     bool isOk() const { return SUCCEEDED(hrc()); }
     bool NotifyAboutChanges() const { return mNotifyAboutChanges; }
@@ -361,9 +361,9 @@
         LogFlowFuncEnter();
 
-        mRC = executeTask();
-
-        LogFlowFunc(("rc=%Rhrc\n", mRC));
+        mHrc = executeTask();
+
+        LogFlowFunc(("hrc=%Rhrc\n", mHrc));
         LogFlowFuncLeave();
-        return mRC;
+        return mHrc;
     }
 
@@ -377,6 +377,6 @@
         try
         {
-            mRC = executeTask(); /* (destructor picks up mRC, see above) */
-            LogFlowFunc(("rc=%Rhrc\n", mRC));
+            mHrc = executeTask(); /* (destructor picks up mHrc, see above) */
+            LogFlowFunc(("hrc=%Rhrc\n", mHrc));
         }
         catch (...)
@@ -394,5 +394,5 @@
 
 protected:
-    HRESULT mRC;
+    HRESULT mHrc;
 
 private:
@@ -455,7 +455,7 @@
           mfKeepMediumLockList(fKeepMediumLockList)
     {
-        AssertReturnVoidStmt(aTarget != NULL, mRC = E_FAIL);
-        mRC = mTargetCaller.hrc();
-        if (FAILED(mRC))
+        AssertReturnVoidStmt(aTarget != NULL, mHrc = E_FAIL);
+        mHrc = mTargetCaller.hrc();
+        if (FAILED(mHrc))
             return;
         m_strTaskName = "createDiff";
@@ -513,14 +513,14 @@
           mfKeepTargetMediumLockList(fKeepTargetMediumLockList)
     {
-        AssertReturnVoidStmt(aTarget != NULL, mRC = E_FAIL);
-        mRC = mTargetCaller.hrc();
-        if (FAILED(mRC))
+        AssertReturnVoidStmt(aTarget != NULL, mHrc = E_FAIL);
+        mHrc = mTargetCaller.hrc();
+        if (FAILED(mHrc))
             return;
         /* aParent may be NULL */
-        mRC = mParentCaller.hrc();
-        if (FAILED(mRC))
+        mHrc = mParentCaller.hrc();
+        if (FAILED(mHrc))
             return;
-        AssertReturnVoidStmt(aSourceMediumLockList != NULL, mRC = E_FAIL);
-        AssertReturnVoidStmt(aTargetMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aSourceMediumLockList != NULL, mHrc = E_FAIL);
+        AssertReturnVoidStmt(aTargetMediumLockList != NULL, mHrc = E_FAIL);
         m_strTaskName = "createClone";
     }
@@ -569,5 +569,5 @@
           mfKeepMediumLockList(fKeepMediumLockList)
     {
-        AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aMediumLockList != NULL, mHrc = E_FAIL);
         m_strTaskName = "createMove";
     }
@@ -603,5 +603,5 @@
           mfKeepMediumLockList(fKeepMediumLockList)
     {
-        AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aMediumLockList != NULL, mHrc = E_FAIL);
         m_strTaskName = "createCompact";
     }
@@ -638,5 +638,5 @@
           mfKeepMediumLockList(fKeepMediumLockList)
     {
-        AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aMediumLockList != NULL, mHrc = E_FAIL);
         m_strTaskName = "createResize";
     }
@@ -746,5 +746,5 @@
           mfKeepMediumLockList(fKeepMediumLockList)
     {
-        AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aMediumLockList != NULL, mHrc = E_FAIL);
         m_strTaskName = "createMerge";
     }
@@ -800,8 +800,8 @@
           mfKeepTargetMediumLockList(fKeepTargetMediumLockList)
     {
-        AssertReturnVoidStmt(aTargetMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aTargetMediumLockList != NULL, mHrc = E_FAIL);
         /* aParent may be NULL */
-        mRC = mParentCaller.hrc();
-        if (FAILED(mRC))
+        mHrc = mParentCaller.hrc();
+        if (FAILED(mHrc))
             return;
 
@@ -809,10 +809,10 @@
 
         int vrc = VDIfCreateFromVfsStream(aVfsIosSrc, RTFILE_O_READ, &mpVfsIoIf);
-        AssertRCReturnVoidStmt(vrc, mRC = E_FAIL);
+        AssertRCReturnVoidStmt(vrc, mHrc = E_FAIL);
 
         vrc = VDInterfaceAdd(&mpVfsIoIf->Core, "Medium::ImportTaskVfsIos",
                              VDINTERFACETYPE_IO, mpVfsIoIf,
                              sizeof(VDINTERFACEIO), &mVDImageIfaces);
-        AssertRCReturnVoidStmt(vrc, mRC = E_FAIL);
+        AssertRCReturnVoidStmt(vrc, mHrc = E_FAIL);
         m_strTaskName = "createImport";
     }
@@ -864,8 +864,8 @@
           mpMediumLockList(aMediumLockList)
     {
-        AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        AssertReturnVoidStmt(aMediumLockList != NULL, mHrc = E_FAIL);
         /* aParent may be NULL */
-        mRC = mParentCaller.hrc();
-        if (FAILED(mRC))
+        mHrc = mParentCaller.hrc();
+        if (FAILED(mHrc))
             return;
 
@@ -1036,5 +1036,5 @@
     AssertReturn(autoInitSpan.isOk(), E_FAIL);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     unconst(m->pVirtualBox) = aVirtualBox;
@@ -1053,9 +1053,9 @@
     /* No storage unit is created yet, no need to call Medium::i_queryInfo */
 
-    rc = i_setFormat(aFormat);
-    if (FAILED(rc)) return rc;
-
-    rc = i_setLocation(aLocation);
-    if (FAILED(rc)) return rc;
+    hrc = i_setFormat(aFormat);
+    if (FAILED(hrc)) return hrc;
+
+    hrc = i_setLocation(aLocation);
+    if (FAILED(hrc)) return hrc;
 
     if (!(m->formatObj->i_getCapabilities() & (  MediumFormatCapabilities_CreateFixed
@@ -1096,13 +1096,13 @@
         }
 
-        rc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
-        Assert(this == pMedium || FAILED(rc));
+        hrc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
+        Assert(this == pMedium || FAILED(hrc));
     }
 
     /* Confirm a successful initialization when it's the case */
-    if (SUCCEEDED(rc))
+    if (SUCCEEDED(hrc))
         autoInitSpan.setSucceeded();
 
-    return rc;
+    return hrc;
 }
 
@@ -1141,5 +1141,5 @@
     AssertReturn(!aLocation.isEmpty(), E_INVALIDARG);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     {
@@ -1167,6 +1167,6 @@
             m->type = MediumType_Writethrough;
 
-        rc = i_setLocation(aLocation);
-        if (FAILED(rc)) return rc;
+        hrc = i_setLocation(aLocation);
+        if (FAILED(hrc)) return hrc;
 
         /* get all the information about the medium from the storage unit */
@@ -1192,7 +1192,6 @@
     /* need to call i_queryInfo immediately to correctly place the medium in
      * the respective media tree and update other information such as uuid */
-    rc = i_queryInfo(fForceNewUuid /* fSetImageId */, false /* fSetParentId */,
-                     autoCaller);
-    if (SUCCEEDED(rc))
+    hrc = i_queryInfo(fForceNewUuid /* fSetImageId */, false /* fSetParentId */, autoCaller);
+    if (SUCCEEDED(hrc))
     {
         AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1203,5 +1202,5 @@
         {
             Assert(!m->strLastAccessError.isEmpty());
-            rc = setError(E_FAIL, "%s", m->strLastAccessError.c_str());
+            hrc = setError(E_FAIL, "%s", m->strLastAccessError.c_str());
             alock.release();
             autoCaller.release();
@@ -1226,5 +1225,5 @@
     }
 
-    return rc;
+    return hrc;
 }
 
@@ -1253,5 +1252,5 @@
                         const settings::Medium &data)
 {
-    HRESULT rc;
+    HRESULT hrc;
 
     if (uuidMachineRegistry.isValid() && !uuidMachineRegistry.isZero())
@@ -1286,6 +1285,6 @@
     {
         AssertReturn(!data.strFormat.isEmpty(), E_FAIL);
-        rc = i_setFormat(data.strFormat);
-        if (FAILED(rc)) return rc;
+        hrc = i_setFormat(data.strFormat);
+        if (FAILED(hrc)) return hrc;
     }
     else
@@ -1293,8 +1292,8 @@
         /// @todo handle host drive settings here as well?
         if (!data.strFormat.isEmpty())
-            rc = i_setFormat(data.strFormat);
+            hrc = i_setFormat(data.strFormat);
         else
-            rc = i_setFormat("RAW");
-        if (FAILED(rc)) return rc;
+            hrc = i_setFormat("RAW");
+        if (FAILED(hrc)) return hrc;
     }
 
@@ -1356,6 +1355,6 @@
         strFull = data.strLocation;
 
-    rc = i_setLocation(strFull);
-    if (FAILED(rc)) return rc;
+    hrc = i_setLocation(strFull);
+    if (FAILED(hrc)) return hrc;
 
     if (aDeviceType == DeviceType_HardDisk)
@@ -1417,5 +1416,5 @@
     AssertReturn(aVirtualBox, E_INVALIDARG);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     MediaList llMediaTocleanup;
@@ -1435,6 +1434,6 @@
         bool fReleasedMediaTreeLock = false;
         ComObjPtr<Medium> pMedium;
-        rc = pMedium.createObject();
-        if (FAILED(rc))
+        hrc = pMedium.createObject();
+        if (FAILED(hrc))
             break;
         ComObjPtr<Medium> pActualMedium(pMedium);
@@ -1442,12 +1441,12 @@
         {
             AutoInitSpan autoInitSpan(pMedium);
-            AssertBreakStmt(autoInitSpan.isOk(), rc = E_FAIL);
+            AssertBreakStmt(autoInitSpan.isOk(), hrc = E_FAIL);
 
             unconst(pMedium->m->pVirtualBox) = aVirtualBox;
-            rc = pMedium->initOne(pParent, aDeviceType, uuidMachineRegistry, strMachineFolder, *current);
-            if (FAILED(rc))
+            hrc = pMedium->initOne(pParent, aDeviceType, uuidMachineRegistry, strMachineFolder, *current);
+            if (FAILED(hrc))
                 break;
-            rc = aVirtualBox->i_registerMedium(pActualMedium, &pActualMedium, mediaTreeLock, true /*fCalledFromMediumInit*/);
-            if (FAILED(rc))
+            hrc = aVirtualBox->i_registerMedium(pActualMedium, &pActualMedium, mediaTreeLock, true /*fCalledFromMediumInit*/);
+            if (FAILED(hrc))
                 break;
 
@@ -1486,5 +1485,5 @@
     }
 
-    if (SUCCEEDED(rc))
+    if (SUCCEEDED(hrc))
     {
         /* Check for consistency. */
@@ -1524,5 +1523,5 @@
     }
 
-    return rc;
+    return hrc;
 }
 
@@ -1578,8 +1577,8 @@
     m->state = MediumState_Created;
     m->hostDrive = true;
-    HRESULT rc = i_setFormat("RAW");
-    if (FAILED(rc)) return rc;
-    rc = i_setLocation(aLocation);
-    if (FAILED(rc)) return rc;
+    HRESULT hrc = i_setFormat("RAW");
+    if (FAILED(hrc)) return hrc;
+    hrc = i_setLocation(aLocation);
+    if (FAILED(hrc)) return hrc;
     m->strDescription = aDescription;
 
@@ -1756,5 +1755,5 @@
     /// require to add the mRegistered flag to data
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     MediumLockList *pMediumLockList(new MediumLockList());
@@ -1771,17 +1770,15 @@
 
         /* Build the lock list. */
-        rc = i_createMediumLockList(true /* fFailIfInaccessible */,
-                                    this /* pToLockWrite */,
-                                    true /* fMediumLockWriteAll */,
-                                    NULL,
-                                    *pMediumLockList);
-        if (FAILED(rc))
-        {
+        hrc = i_createMediumLockList(true /* fFailIfInaccessible */,
+                                     this /* pToLockWrite */,
+                                     true /* fMediumLockWriteAll */,
+                                     NULL,
+                                     *pMediumLockList);
+        if (FAILED(hrc))
             pszError = tr("Failed to create medium lock list for '%s'");
-        }
         else
         {
-            rc = pMediumLockList->Lock();
-            if (FAILED(rc))
+            hrc = pMediumLockList->Lock();
+            if (FAILED(hrc))
                 pszError = tr("Failed to lock media '%s'");
         }
@@ -1796,6 +1793,6 @@
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-        if (FAILED(rc))
-            throw setError(rc, pszError, i_getLocationFull().c_str());
+        if (FAILED(hrc))
+            throw setError(hrc, pszError, i_getLocationFull().c_str());
 
         /* Set a new description */
@@ -1810,9 +1807,9 @@
         m->pVirtualBox->i_onMediumConfigChanged(this);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { hrc = hrcXcpt; }
 
     delete pMediumLockList;
 
-    return rc;
+    return hrc;
 }
 
@@ -2270,7 +2267,7 @@
     alock.release();
 
-    HRESULT rc = i_queryInfo(!!aSetImageId /* fSetImageId */,
-                             !!aSetParentId /* fSetParentId */,
-                             autoCaller);
+    HRESULT hrc = i_queryInfo(!!aSetImageId /* fSetImageId */,
+                              !!aSetParentId /* fSetParentId */,
+                              autoCaller);
 
     AutoReadLock arlock(this COMMA_LOCKVAL_SRC_POS);
@@ -2279,5 +2276,5 @@
     arlock.release();
 
-    if (SUCCEEDED(rc))
+    if (SUCCEEDED(hrc))
     {
         if (uCurrImage != uPrevImage)
@@ -2292,5 +2289,5 @@
     }
 
-    return rc;
+    return hrc;
 }
 
@@ -2299,5 +2296,5 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     switch (m->state)
@@ -2310,6 +2307,5 @@
             alock.release();
 
-            rc = i_queryInfo(false /* fSetImageId */, false /* fSetParentId */,
-                             autoCaller);
+            hrc = i_queryInfo(false /* fSetImageId */, false /* fSetParentId */, autoCaller);
 
             alock.acquire();
@@ -2322,5 +2318,5 @@
     *aState = m->state;
 
-    return rc;
+    return hrc;
 }
 
@@ -2383,5 +2379,5 @@
     }
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     switch (m->state)
@@ -2393,5 +2389,5 @@
             ++m->readers;
 
-            ComAssertMsgBreak(m->readers != 0, (tr("Counter overflow")), rc = E_FAIL);
+            ComAssertMsgBreak(m->readers != 0, (tr("Counter overflow")), hrc = E_FAIL);
 
             /* Remember pre-lock state */
@@ -2403,13 +2399,13 @@
 
             ComObjPtr<MediumLockToken> pToken;
-            rc = pToken.createObject();
-            if (SUCCEEDED(rc))
-                rc = pToken->init(this, false /* fWrite */);
-            if (FAILED(rc))
+            hrc = pToken.createObject();
+            if (SUCCEEDED(hrc))
+                hrc = pToken->init(this, false /* fWrite */);
+            if (FAILED(hrc))
             {
                 --m->readers;
                 if (m->readers == 0)
                     m->state = m->preLockState;
-                return rc;
+                return hrc;
             }
 
@@ -2420,10 +2416,10 @@
         {
             LogFlowThisFunc(("Failing - state=%d\n", m->state));
-            rc = i_setStateError();
+            hrc = i_setStateError();
             break;
         }
     }
 
-    return rc;
+    return hrc;
 }
 
@@ -2439,5 +2435,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     switch (m->state)
@@ -2445,5 +2441,5 @@
         case MediumState_LockedRead:
         {
-            ComAssertMsgBreak(m->readers != 0, (tr("Counter underflow")), rc = E_FAIL);
+            ComAssertMsgBreak(m->readers != 0, (tr("Counter underflow")), hrc = E_FAIL);
             --m->readers;
 
@@ -2465,7 +2461,5 @@
         {
             LogFlowThisFunc(("Failing - state=%d\n", m->state));
-            rc = setError(VBOX_E_INVALID_OBJECT_STATE,
-                          tr("Medium '%s' is not locked for reading"),
-                          m->strLocationFull.c_str());
+            hrc = setError(VBOX_E_INVALID_OBJECT_STATE, tr("Medium '%s' is not locked for reading"), m->strLocationFull.c_str());
             break;
         }
@@ -2476,5 +2470,5 @@
         *aState = m->state;
 
-    return rc;
+    return hrc;
 }
 HRESULT Medium::lockWrite(ComPtr<IToken> &aToken)
@@ -2500,5 +2494,5 @@
     }
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     switch (m->state)
@@ -2513,11 +2507,11 @@
 
             ComObjPtr<MediumLockToken> pToken;
-            rc = pToken.createObject();
-            if (SUCCEEDED(rc))
-                rc = pToken->init(this, true /* fWrite */);
-            if (FAILED(rc))
+            hrc = pToken.createObject();
+            if (SUCCEEDED(hrc))
+                hrc = pToken->init(this, true /* fWrite */);
+            if (FAILED(hrc))
             {
                 m->state = m->preLockState;
-                return rc;
+                return hrc;
             }
 
@@ -2528,10 +2522,10 @@
         {
             LogFlowThisFunc(("Failing - state=%d locationFull=%s\n", m->state, i_getLocationFull().c_str()));
-            rc = i_setStateError();
+            hrc = i_setStateError();
             break;
         }
     }
 
-    return rc;
+    return hrc;
 }
 
@@ -2547,5 +2541,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     switch (m->state)
@@ -2565,7 +2559,5 @@
         {
             LogFlowThisFunc(("Failing - state=%d locationFull=%s\n", m->state, i_getLocationFull().c_str()));
-            rc = setError(VBOX_E_INVALID_OBJECT_STATE,
-                          tr("Medium '%s' is not locked for writing"),
-                          m->strLocationFull.c_str());
+            hrc = setError(VBOX_E_INVALID_OBJECT_STATE, tr("Medium '%s' is not locked for writing"), m->strLocationFull.c_str());
             break;
         }
@@ -2576,5 +2568,5 @@
         *aState = m->state;
 
-    return rc;
+    return hrc;
 }
 
@@ -2772,5 +2764,5 @@
         return setError(E_INVALIDARG, tr("The medium size argument (%lld) is negative"), aLogicalSize);
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     ComObjPtr<Progress> pProgress;
     Medium::Task *pTask = NULL;
@@ -2811,31 +2803,34 @@
 
         pProgress.createObject();
-        rc = pProgress->init(m->pVirtualBox,
-                             static_cast<IMedium*>(this),
-                             (mediumVariantFlags & MediumVariant_Fixed)
-                               ? BstrFmt(tr("Creating fixed medium storage unit '%s'"), m->strLocationFull.c_str()).raw()
-                               : BstrFmt(tr("Creating dynamic medium storage unit '%s'"), m->strLocationFull.c_str()).raw(),
-                             TRUE /* aCancelable */);
-        if (FAILED(rc))
-            throw rc;
+        hrc = pProgress->init(m->pVirtualBox,
+                              static_cast<IMedium*>(this),
+                              mediumVariantFlags & MediumVariant_Fixed
+                              ? BstrFmt(tr("Creating fixed medium storage unit '%s'"), m->strLocationFull.c_str()).raw()
+                              : BstrFmt(tr("Creating dynamic medium storage unit '%s'"), m->strLocationFull.c_str()).raw(),
+                              TRUE /* aCancelable */);
+        if (FAILED(hrc))
+            throw hrc;
 
         /* setup task object to carry out the operation asynchronously */
         pTask = new Medium::CreateBaseTask(this, pProgress, (uint64_t)aLogicalSize,
                                            (MediumVariant_T)mediumVariantFlags);
-        rc = pTask->hrc();
-        AssertComRC(rc);
-        if (FAILED(rc))
-            throw rc;
+        hrc = pTask->hrc();
+        AssertComRC(hrc);
+        if (FAILED(hrc))
+            throw hrc;
 
         m->state = MediumState_Creating;
     }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    if (SUCCEEDED(rc))
-    {
-        rc = pTask->createThread();
+    catch (HRESULT hrcXcpt)
+    {
+        hrc = hrcXcpt;
+    }
+
+    if (SUCCEEDED(hrc))
+    {
+        hrc = pTask->createThread();
         pTask = NULL;
 
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(hrc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
     }
@@ -2843,5 +2838,5 @@
         delete pTask;
 
-    return rc;
+    return hrc;
 }
 
@@ -2902,18 +2897,18 @@
     autoCaller.release();
     treeLock.release();
-    HRESULT rc = diff->i_createMediumLockList(true /* fFailIfInaccessible */,
-                                              diff /* pToLockWrite */,
-                                              false /* fMediumLockWriteAll */,
-                                              this,
-                                              *pMediumLockList);
+    HRESULT hrc = diff->i_createMediumLockList(true /* fFailIfInaccessible */,
+                                               diff /* pToLockWrite */,
+                                               false /* fMediumLockWriteAll */,
+                                               this,
+                                               *pMediumLockList);
     treeLock.acquire();
     autoCaller.add();
     if (FAILED(autoCaller.hrc()))
-        rc = autoCaller.hrc();
+        hrc = autoCaller.hrc();
     alock.acquire();
-    if (FAILED(rc))
+    if (FAILED(hrc))
     {
         delete pMediumLockList;
-        return rc;
+        return hrc;
     }
 
@@ -2921,15 +2916,15 @@
     autoCaller.release();
     treeLock.release();
-    rc = pMediumLockList->Lock();
+    hrc = pMediumLockList->Lock();
     treeLock.acquire();
     autoCaller.add();
     if (FAILED(autoCaller.hrc()))
-        rc = autoCaller.hrc();
+        hrc = autoCaller.hrc();
     alock.acquire();
-    if (FAILED(rc))
+    if (FAILED(hrc))
     {
         delete pMediumLockList;
 
-        return setError(rc, tr("Could not lock medium when creating diff '%s'"),
+        return setError(hrc, tr("Could not lock medium when creating diff '%s'"),
                         diff->i_getLocationFull().c_str());
     }
@@ -2970,12 +2965,12 @@
     }
 
-    rc = i_createDiffStorage(diff, (MediumVariant_T)mediumVariantFlags, pMediumLockList,
-                             &pProgress, false /* aWait */, true /* aNotify */);
-    if (FAILED(rc))
+    hrc = i_createDiffStorage(diff, (MediumVariant_T)mediumVariantFlags, pMediumLockList,
+                              &pProgress, false /* aWait */, true /* aNotify */);
+    if (FAILED(hrc))
         delete pMediumLockList;
     else
         pProgress.queryInterfaceTo(aProgress.asOutParam());
 
-    return rc;
+    return hrc;
 }
 
@@ -2994,20 +2989,18 @@
     MediumLockList *pMediumLockList = NULL;
 
-    HRESULT rc = S_OK;
-
-    rc = i_prepareMergeTo(pTarget, NULL, NULL, true, fMergeForward,
-                          pParentForTarget, pChildrenToReparent, pMediumLockList);
-    if (FAILED(rc)) return rc;
+    HRESULT hrc = i_prepareMergeTo(pTarget, NULL, NULL, true, fMergeForward,
+                                   pParentForTarget, pChildrenToReparent, pMediumLockList);
+    if (FAILED(hrc)) return hrc;
 
     ComObjPtr<Progress> pProgress;
 
-    rc = i_mergeTo(pTarget, fMergeForward, pParentForTarget, pChildrenToReparent,
-                   pMediumLockList, &pProgress, false /* aWait */, true /* aNotify */);
-    if (FAILED(rc))
+    hrc = i_mergeTo(pTarget, fMergeForward, pParentForTarget, pChildrenToReparent,
+                    pMediumLockList, &pProgress, false /* aWait */, true /* aNotify */);
+    if (FAILED(hrc))
         i_cancelMergeTo(pChildrenToReparent, pMediumLockList);
     else
         pProgress.queryInterfaceTo(aProgress.asOutParam());
 
-    return rc;
+    return hrc;
 }
 
@@ -3040,5 +3033,5 @@
     }
 
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     ComObjPtr<Progress> pProgress;
     Medium::Task *pTask = NULL;
@@ -3066,14 +3059,14 @@
         MediumLockList *pSourceMediumLockList(new MediumLockList());
         alock.release();
-        rc = i_createMediumLockList(true /* fFailIfInaccessible */,
-                                    NULL /* pToLockWrite */,
-                                    false /* fMediumLockWriteAll */,
-                                    NULL,
-                                    *pSourceMediumLockList);
+        hrc = i_createMediumLockList(true /* fFailIfInaccessible */,
+                                     NULL /* pToLockWrite */,
+                                     false /* fMediumLockWriteAll */,
+                                     NULL,
+                                     *pSourceMediumLockList);
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
@@ -3081,36 +3074,36 @@
         MediumLockList *pTargetMediumLockList(new MediumLockList());
         alock.release();
-        rc = pTarget->i_createMediumLockList(true /* fFailIfInaccessible */,
-                                             pTarget /* pToLockWrite */,
-                                             false /* fMediumLockWriteAll */,
-                                             pParent,
-                                             *pTargetMediumLockList);
+        hrc = pTarget->i_createMediumLockList(true /* fFailIfInaccessible */,
+                                              pTarget /* pToLockWrite */,
+                                              false /* fMediumLockWriteAll */,
+                                              pParent,
+                                              *pTargetMediumLockList);
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
         alock.release();
-        rc = pSourceMediumLockList->Lock();
+        hrc = pSourceMediumLockList->Lock();
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw setError(rc,
+            throw setError(hrc,
                            tr("Failed to lock source media '%s'"),
                            i_getLocationFull().c_str());
         }
         alock.release();
-        rc = pTargetMediumLockList->Lock();
+        hrc = pTargetMediumLockList->Lock();
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw setError(rc,
+            throw setError(hrc,
                            tr("Failed to lock target media '%s'"),
                            pTarget->i_getLocationFull().c_str());
@@ -3118,13 +3111,13 @@
 
         pProgress.createObject();
-        rc = pProgress->init(m->pVirtualBox,
-                             static_cast <IMedium *>(this),
-                             BstrFmt(tr("Creating clone medium '%s'"), pTarget->m->strLocationFull.c_str()).raw(),
-                             TRUE /* aCancelable */);
-        if (FAILED(rc))
+        hrc = pProgress->init(m->pVirtualBox,
+                              static_cast <IMedium *>(this),
+                              BstrFmt(tr("Creating clone medium '%s'"), pTarget->m->strLocationFull.c_str()).raw(),
+                              TRUE /* aCancelable */);
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
@@ -3150,19 +3143,22 @@
                                       pParent, UINT32_MAX, UINT32_MAX,
                                       pSourceMediumLockList, pTargetMediumLockList);
-        rc = pTask->hrc();
-        AssertComRC(rc);
-        if (FAILED(rc))
-            throw rc;
+        hrc = pTask->hrc();
+        AssertComRC(hrc);
+        if (FAILED(hrc))
+            throw hrc;
 
         if (pTarget->m->state == MediumState_NotCreated)
             pTarget->m->state = MediumState_Creating;
     }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    if (SUCCEEDED(rc))
-    {
-        rc = pTask->createThread();
+    catch (HRESULT hrcXcpt)
+    {
+        hrc = hrcXcpt;
+    }
+
+    if (SUCCEEDED(hrc))
+    {
+        hrc = pTask->createThread();
         pTask = NULL;
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(hrc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
     }
@@ -3170,5 +3166,5 @@
         delete pTask;
 
-    return rc;
+    return hrc;
 }
 
@@ -3206,5 +3202,5 @@
 
     /* Set up variables. Fetch needed data in lockable blocks */
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     Medium::Task *pTask = NULL;
 
@@ -3226,14 +3222,13 @@
     ComObjPtr<Progress> pProgress;
     pProgress.createObject();
-    rc = pProgress->init(m->pVirtualBox,
-                static_cast<IMedium*>(this),
-                BstrFmt(tr("Resizing medium and cloning into it")).raw(),
-                TRUE, /* aCancelable */
-                2, /* Number of opearations */
-                BstrFmt(tr("Resizing medium before clone")).raw()
-                );
-
-    if (FAILED(rc))
-        return rc;
+    hrc = pProgress->init(m->pVirtualBox,
+                          static_cast<IMedium*>(this),
+                          BstrFmt(tr("Resizing medium and cloning into it")).raw(),
+                          TRUE, /* aCancelable */
+                          2, /* Number of opearations */
+                          BstrFmt(tr("Resizing medium before clone")).raw()
+                          );
+    if (FAILED(hrc))
+        return hrc;
 
     /* If target does not exist, handle resize. */
@@ -3243,9 +3238,8 @@
             if (!i_isMediumFormatFile())
             {
-                rc = setError(VBOX_E_NOT_SUPPORTED,
-                              tr("Sizes of '%s' and '%s' are different and \
-                                 medium format does not support resing"),
-                              strSourceName.c_str(), strTargetName.c_str());
-                return rc;
+                hrc = setError(VBOX_E_NOT_SUPPORTED,
+                               tr("Sizes of '%s' and '%s' are different and medium format does not support resing"),
+                               strSourceName.c_str(), strTargetName.c_str());
+                return hrc;
             }
 
@@ -3256,7 +3250,7 @@
 
             ComPtr<IToken> pToken;
-            rc = pTarget->LockWrite(pToken.asOutParam());
-
-            if (FAILED(rc)) return rc;
+            hrc = pTarget->LockWrite(pToken.asOutParam());
+
+            if (FAILED(hrc)) return hrc;
 
             /**
@@ -3268,25 +3262,23 @@
             pMediumLockListForResize->Append(pTarget, pTarget->m->state == MediumState_LockedWrite);
 
-            rc = pMediumLockListForResize->Lock(true /* fSkipOverLockedMedia */);
-
-            if (FAILED(rc))
+            hrc = pMediumLockListForResize->Lock(true /* fSkipOverLockedMedia */);
+            if (FAILED(hrc))
             {
                 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-                rc = setError(rc,
-                                tr("Failed to lock the medium '%s' to resize before merge"),
-                                strTargetName.c_str());
+                hrc = setError(hrc,
+                               tr("Failed to lock the medium '%s' to resize before merge"),
+                               strTargetName.c_str());
                 delete pMediumLockListForResize;
-                return rc;
-            }
-
-
-            rc = pTarget->i_resize((uint64_t)aLogicalSize, pMediumLockListForResize, &pProgress, true, false);
-
-            if (FAILED(rc))
+                return hrc;
+            }
+
+
+            hrc = pTarget->i_resize((uint64_t)aLogicalSize, pMediumLockListForResize, &pProgress, true, false);
+            if (FAILED(hrc))
             {
                 /* No need to setError becasue i_resize and i_taskResizeHandler handle this automatically. */
                 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
                 delete pMediumLockListForResize;
-                return rc;
+                return hrc;
             }
 
@@ -3301,5 +3293,5 @@
 
     /* Report progress to supplied progress argument */
-    if (SUCCEEDED(rc))
+    if (SUCCEEDED(hrc))
     {
         pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3328,14 +3320,14 @@
         MediumLockList *pSourceMediumLockList(new MediumLockList());
         alock.release();
-        rc = i_createMediumLockList(true /* fFailIfInaccessible */,
-                                    NULL /* pToLockWrite */,
-                                    false /* fMediumLockWriteAll */,
-                                    NULL,
-                                    *pSourceMediumLockList);
+        hrc = i_createMediumLockList(true /* fFailIfInaccessible */,
+                                     NULL /* pToLockWrite */,
+                                     false /* fMediumLockWriteAll */,
+                                     NULL,
+                                     *pSourceMediumLockList);
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
@@ -3343,36 +3335,36 @@
         MediumLockList *pTargetMediumLockList(new MediumLockList());
         alock.release();
-        rc = pTarget->i_createMediumLockList(true /* fFailIfInaccessible */,
-                                             pTarget /* pToLockWrite */,
-                                             false /* fMediumLockWriteAll */,
-                                             pParent,
-                                             *pTargetMediumLockList);
+        hrc = pTarget->i_createMediumLockList(true /* fFailIfInaccessible */,
+                                              pTarget /* pToLockWrite */,
+                                              false /* fMediumLockWriteAll */,
+                                              pParent,
+                                              *pTargetMediumLockList);
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
         alock.release();
-        rc = pSourceMediumLockList->Lock();
+        hrc = pSourceMediumLockList->Lock();
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw setError(rc,
+            throw setError(hrc,
                            tr("Failed to lock source media '%s'"),
                            i_getLocationFull().c_str());
         }
         alock.release();
-        rc = pTargetMediumLockList->Lock();
+        hrc = pTargetMediumLockList->Lock();
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pSourceMediumLockList;
             delete pTargetMediumLockList;
-            throw setError(rc,
+            throw setError(hrc,
                            tr("Failed to lock target media '%s'"),
                            pTarget->i_getLocationFull().c_str());
@@ -3414,19 +3406,19 @@
         }
 
-        rc = pTask->hrc();
-        AssertComRC(rc);
-        if (FAILED(rc))
-            throw rc;
+        hrc = pTask->hrc();
+        AssertComRC(hrc);
+        if (FAILED(hrc))
+            throw hrc;
 
         if (pTarget->m->state == MediumState_NotCreated)
             pTarget->m->state = MediumState_Creating;
     }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    if (SUCCEEDED(rc))
-    {
-        rc = pTask->createThread();
+    catch (HRESULT hrcXcpt) { hrc = hrcXcpt; }
+
+    if (SUCCEEDED(hrc))
+    {
+        hrc = pTask->createThread();
         pTask = NULL;
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(hrc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
     }
@@ -3434,5 +3426,5 @@
         delete pTask;
 
-    return rc;
+    return hrc;
 }
 
@@ -3441,5 +3433,5 @@
     ComObjPtr<Medium> pParent;
     ComObjPtr<Progress> pProgress;
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     Medium::Task *pTask = NULL;
 
@@ -3474,8 +3466,8 @@
             if (aLocation.isEmpty())
             {
-                rc = setErrorVrc(VERR_PATH_ZERO_LENGTH,
-                                 tr("Medium '%s' can't be moved. Destination path is empty."),
-                                 i_getLocationFull().c_str());
-                throw rc;
+                hrc = setErrorVrc(VERR_PATH_ZERO_LENGTH,
+                                  tr("Medium '%s' can't be moved. Destination path is empty."),
+                                  i_getLocationFull().c_str());
+                throw hrc;
             }
 
@@ -3541,8 +3533,8 @@
                                 break;
                             default:
-                                rc = setErrorVrc(VERR_NOT_A_FILE, /** @todo r=bird: Mixing status codes again. */
-                                                 tr("Medium '%s' has RAW type. \"Move\" operation isn't supported for this type."),
-                                                 i_getLocationFull().c_str());
-                                throw rc;
+                                hrc = setErrorVrc(VERR_NOT_A_FILE, /** @todo r=bird: Mixing status codes again. */
+                                                  tr("Medium '%s' has RAW type. \"Move\" operation isn't supported for this type."),
+                                                  i_getLocationFull().c_str());
+                                throw hrc;
                         }
                     }
@@ -3562,45 +3554,33 @@
             /* Simple check for existence */
             if (RTFileExists(destPath.c_str()))
-            {
-                rc = setError(VBOX_E_FILE_ERROR,
-                              tr("The given path '%s' is an existing file. Delete or rename this file."),
-                              destPath.c_str());
-                throw rc;
-            }
+                throw setError(VBOX_E_FILE_ERROR,
+                               tr("The given path '%s' is an existing file. Delete or rename this file."),
+                               destPath.c_str());
 
             if (!i_isMediumFormatFile())
-            {
-                rc = setErrorVrc(VERR_NOT_A_FILE,
-                                 tr("Medium '%s' isn't a file object. \"Move\" operation isn't supported."),
-                                 i_getLocationFull().c_str());
-                throw rc;
-            }
+                throw setErrorVrc(VERR_NOT_A_FILE,
+                                  tr("Medium '%s' isn't a file object. \"Move\" operation isn't supported."),
+                                  i_getLocationFull().c_str());
             /* Path must be absolute */
             if (!RTPathStartsWithRoot(destPath.c_str()))
-            {
-                rc = setError(VBOX_E_FILE_ERROR,
-                              tr("The given path '%s' is not fully qualified"),
-                              destPath.c_str());
-                throw rc;
-            }
+                throw setError(VBOX_E_FILE_ERROR,
+                               tr("The given path '%s' is not fully qualified"),
+                               destPath.c_str());
             /* Check path for a new file object */
-            rc = VirtualBox::i_ensureFilePathExists(destPath, true);
-            if (FAILED(rc))
-                throw rc;
+            hrc = VirtualBox::i_ensureFilePathExists(destPath, true);
+            if (FAILED(hrc))
+                throw hrc;
 
             /* Set needed variables for "moving" procedure. It'll be used later in separate thread task */
-            rc = i_preparationForMoving(destPath);
-            if (FAILED(rc))
-            {
-                rc = setErrorVrc(VERR_NO_CHANGE,
-                                 tr("Medium '%s' is already in the correct location"),
-                                 i_getLocationFull().c_str());
-                throw rc;
-            }
+            hrc = i_preparationForMoving(destPath);
+            if (FAILED(hrc))
+                throw setErrorVrc(VERR_NO_CHANGE,
+                                  tr("Medium '%s' is already in the correct location"),
+                                  i_getLocationFull().c_str());
         }
 
         /* Check VMs which have this medium attached to*/
         std::vector<com::Guid> aMachineIds;
-        rc = getMachineIds(aMachineIds);
+        hrc = getMachineIds(aMachineIds);
         std::vector<com::Guid>::const_iterator currMachineID = aMachineIds.begin();
         std::vector<com::Guid>::const_iterator lastMachineID = aMachineIds.end();
@@ -3614,5 +3594,5 @@
             autoCaller.release();
             treeLock.release();
-            rc = m->pVirtualBox->i_findMachine(id, false, true, &aMachine);
+            hrc = m->pVirtualBox->i_findMachine(id, false, true, &aMachine);
             treeLock.acquire();
             autoCaller.add();
@@ -3620,5 +3600,5 @@
             alock.acquire();
 
-            if (SUCCEEDED(rc))
+            if (SUCCEEDED(hrc))
             {
                 ComObjPtr<SessionMachine> sm;
@@ -3635,11 +3615,7 @@
 
                 if (ses)
-                {
-                    rc = setError(VBOX_E_INVALID_VM_STATE,
-                                  tr("At least the VM '%s' to whom this medium '%s' attached has currently an opened session. Stop all VMs before relocating this medium"),
-                                  id.toString().c_str(),
-                                  i_getLocationFull().c_str());
-                    throw rc;
-                }
+                    throw setError(VBOX_E_INVALID_VM_STATE,
+                                   tr("At least the VM '%s' to whom this medium '%s' attached has currently an opened session. Stop all VMs before relocating this medium"),
+                                   id.toString().c_str(), i_getLocationFull().c_str());
             }
             ++currMachineID;
@@ -3651,44 +3627,40 @@
         autoCaller.release();
         treeLock.release();
-        rc = i_createMediumLockList(true /* fFailIfInaccessible */,
-                                    this /* pToLockWrite */,
-                                    true /* fMediumLockWriteAll */,
-                                    NULL,
-                                    *pMediumLockList);
+        hrc = i_createMediumLockList(true /* fFailIfInaccessible */,
+                                     this /* pToLockWrite */,
+                                     true /* fMediumLockWriteAll */,
+                                     NULL,
+                                     *pMediumLockList);
         treeLock.acquire();
         autoCaller.add();
         AssertComRCThrowRC(autoCaller.hrc());
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pMediumLockList;
-            throw setError(rc,
-                           tr("Failed to create medium lock list for '%s'"),
-                           i_getLocationFull().c_str());
+            throw setError(hrc, tr("Failed to create medium lock list for '%s'"), i_getLocationFull().c_str());
         }
         alock.release();
         autoCaller.release();
         treeLock.release();
-        rc = pMediumLockList->Lock();
+        hrc = pMediumLockList->Lock();
         treeLock.acquire();
         autoCaller.add();
         AssertComRCThrowRC(autoCaller.hrc());
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pMediumLockList;
-            throw setError(rc,
-                           tr("Failed to lock media '%s'"),
-                           i_getLocationFull().c_str());
+            throw setError(hrc, tr("Failed to lock media '%s'"), i_getLocationFull().c_str());
         }
 
         pProgress.createObject();
-        rc = pProgress->init(m->pVirtualBox,
-                             static_cast <IMedium *>(this),
-                             BstrFmt(tr("Moving medium '%s'"), m->strLocationFull.c_str()).raw(),
-                             TRUE /* aCancelable */);
+        hrc = pProgress->init(m->pVirtualBox,
+                              static_cast <IMedium *>(this),
+                              BstrFmt(tr("Moving medium '%s'"), m->strLocationFull.c_str()).raw(),
+                              TRUE /* aCancelable */);
 
         /* Do the disk moving. */
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(hrc))
         {
             ULONG mediumVariantFlags = i_getVariant();
@@ -3698,18 +3670,18 @@
                                          (MediumVariant_T)mediumVariantFlags,
                                          pMediumLockList);
-            rc = pTask->hrc();
-            AssertComRC(rc);
-            if (FAILED(rc))
-                throw rc;
-        }
-
-    }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    if (SUCCEEDED(rc))
-    {
-        rc = pTask->createThread();
+            hrc = pTask->hrc();
+            AssertComRC(hrc);
+            if (FAILED(hrc))
+                throw hrc;
+        }
+
+    }
+    catch (HRESULT hrcXcpt) { hrc = hrcXcpt; }
+
+    if (SUCCEEDED(hrc))
+    {
+        hrc = pTask->createThread();
         pTask = NULL;
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(hrc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
     }
@@ -3720,10 +3692,10 @@
     }
 
-    return rc;
+    return hrc;
 }
 
 HRESULT Medium::setLocation(const com::Utf8Str &aLocation)
 {
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
 
     try
@@ -3745,24 +3717,16 @@
             /* Path must be absolute */
             if (!RTPathStartsWithRoot(destPath.c_str()))
-            {
-                rc = setError(VBOX_E_FILE_ERROR,
-                              tr("The given path '%s' is not fully qualified"),
-                              destPath.c_str());
-                throw rc;
-            }
+                throw setError(VBOX_E_FILE_ERROR, tr("The given path '%s' is not fully qualified"), destPath.c_str());
 
             /* Simple check for existence */
             if (!RTFileExists(destPath.c_str()))
-            {
-                rc = setError(VBOX_E_FILE_ERROR,
-                              tr("The given path '%s' is not an existing file. New location is invalid."),
-                              destPath.c_str());
-                throw rc;
-            }
+                throw setError(VBOX_E_FILE_ERROR,
+                               tr("The given path '%s' is not an existing file. New location is invalid."),
+                               destPath.c_str());
         }
 
         /* Check VMs which have this medium attached to*/
         std::vector<com::Guid> aMachineIds;
-        rc = getMachineIds(aMachineIds);
+        hrc = getMachineIds(aMachineIds);
 
         // switch locks only if there are machines with this medium attached
@@ -3780,6 +3744,6 @@
                 Guid id(*currMachineID);
                 ComObjPtr<Machine> aMachine;
-                rc = m->pVirtualBox->i_findMachine(id, false, true, &aMachine);
-                if (SUCCEEDED(rc))
+                hrc = m->pVirtualBox->i_findMachine(id, false, true, &aMachine);
+                if (SUCCEEDED(hrc))
                 {
                     ComObjPtr<SessionMachine> sm;
@@ -3794,9 +3758,8 @@
                         alock.acquire();
 
-                        rc = setError(VBOX_E_INVALID_VM_STATE,
-                                      tr("At least the VM '%s' to whom this medium '%s' attached has currently an opened session. Stop all VMs before set location for this medium"),
-                                      id.toString().c_str(),
-                                      i_getLocationFull().c_str());
-                        throw rc;
+                        throw setError(VBOX_E_INVALID_VM_STATE,
+                                       tr("At least the VM '%s' to whom this medium '%s' attached has currently an opened session. Stop all VMs before set location for this medium"),
+                                       id.toString().c_str(),
+                                       i_getLocationFull().c_str());
                     }
                 }
@@ -3824,12 +3787,12 @@
         m->pVirtualBox->i_onMediumConfigChanged(this);
     }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    return rc;
+    catch (HRESULT hrcXcpt) { hrc = hrcXcpt; }
+
+    return hrc;
 }
 
 HRESULT Medium::compact(ComPtr<IProgress> &aProgress)
 {
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     ComObjPtr<Progress> pProgress;
     Medium::Task *pTask = NULL;
@@ -3842,23 +3805,23 @@
         MediumLockList *pMediumLockList(new MediumLockList());
         alock.release();
-        rc = i_createMediumLockList(true /* fFailIfInaccessible */ ,
-                                    this /* pToLockWrite */,
-                                    false /* fMediumLockWriteAll */,
-                                    NULL,
-                                    *pMediumLockList);
+        hrc = i_createMediumLockList(true /* fFailIfInaccessible */ ,
+                                     this /* pToLockWrite */,
+                                     false /* fMediumLockWriteAll */,
+                                     NULL,
+                                     *pMediumLockList);
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
         alock.release();
-        rc = pMediumLockList->Lock();
+        hrc = pMediumLockList->Lock();
         alock.acquire();
-        if (FAILED(rc))
+        if (FAILED(hrc))
         {
             delete pMediumLockList;
-            throw setError(rc,
+            throw setError(hrc,
                            tr("Failed to lock media when compacting '%s'"),
                            i_getLocationFull().c_str());
@@ -3866,28 +3829,28 @@
 
         pProgress.createObject();
-        rc = pProgress->init(m->pVirtualBox,
-                             static_cast <IMedium *>(this),
-                             BstrFmt(tr("Compacting medium '%s'"), m->strLocationFull.c_str()).raw(),
-                             TRUE /* aCancelable */);
-        if (FAILED(rc))
+        hrc = pProgress->init(m->pVirtualBox,
+                              static_cast <IMedium *>(this),
+                              BstrFmt(tr("Compacting medium '%s'"), m->strLocationFull.c_str()).raw(),
+                              TRUE /* aCancelable */);
+        if (FAILED(hrc))
         {
             delete pMediumLockList;
-            throw rc;
+            throw hrc;
         }
 
         /* setup task object to carry out the operation asynchronously */
         pTask = new Medium::CompactTask(this, pProgress, pMediumLockList);
-        rc = pTask->hrc();
-        AssertComRC(rc);
-        if (FAILED(rc))
-            throw rc;
-    }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    if (SUCCEEDED(rc))
-    {
-        rc = pTask->createThread();
+        hrc = pTask->hrc();
+        AssertComRC(hrc);
+        if (FAILED(hrc))
+            throw hrc;
+    }
+    catch (HRESULT hrcXcpt) { hrc = hrcXcpt; }
+
+    if (SUCCEEDED(hrc))
+    {
+        hrc = pTask->createThread();
         pTask = NULL;
-        if (SUCCEEDED(rc))
+        if (SUCCEEDED(hrc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
     }
@@ -3895,5 +3858,5 @@
         delete pTask;
 
-    return rc;
+    return hrc;
 }
 
@@ -3902,5 +3865,5 @@
 {
     CheckComArgExpr(aLogicalSize, aLogicalSize > 0);
-    HRESULT rc = S_OK;
+    HRESULT hrc = S_OK;
     ComObjPtr<Progress> pProgress;
 
@@ -3912,17 +3875,15 @@
         const char *pszError = NULL;
 
-        rc = i_createMediumLockList(true /* fFailIfInaccessible */ ,
-                                    this /* pToLockWrite */,
-                                    false /* fMediumLockWriteAll */,
-                                    NULL,
-                                    *pMediumLockList);
-        if (FAILED(rc))
-        {
+        hrc = i_createMediumLockList(true /* fFailIfInaccessible */ ,
+                                     this /* pToLockWrite */,
+                                     false /* fMediumLockWriteAll */,
+                                     NULL,
+                                     *pMediumLockList);
+        if (FAILED(hrc))
             pszError = tr("Failed to create medium lock list when resizing '%s'");
-        }
         else
         {
-            rc = pMediumLockList->Lock();
-            if (FAILED(rc))
+            hrc = pMediumLockList->Lock();
+            if (FAILED(hrc))
                 pszError = tr("Failed to lock media when resizing '%s'");
         }
@@ -3931,30 +3892,30 @@
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-        if (FAILED(rc))
-        {
-            throw setError(rc, pszError, i_getLocationFull().c_str());
+        if (FAILED(hrc))
+        {
+            throw setError(hrc, pszError, i_getLocationFull().c_str());
         }
 
         pProgress.createObject();
-        rc = pProgress->init(m->pVirtualBox,
-                             static_cast <IMedium *>(this),
-                             BstrFmt(tr("Resizing medium '%s'"), m->strLocationFull.c_str()).raw(),
-                             TRUE /* aCancelable */);
-        if (FAILED(rc))
-        {
-            throw rc;
-        }
-    }
-    catch (HRESULT aRC) { rc = aRC; }
-
-    if (SUCCEEDED(rc))
-        rc = i_resize((uint64_t)aLogicalSize, pMediumLockList, &pProgress, false /* aWait */, true /* aNotify */);
-
-    if (SUCCEEDED(rc))
+        hrc = pProgress->init(m->pVirtualBox,
+                              static_cast <IMedium *>(this),
+                              BstrFmt(tr("Resizing medium '%s'"), m->strLocationFull.c_str()).raw(),
+                              TRUE /* aCancelable */);
+        if (FAILED(hrc))
+        {
+            throw hrc;
+        }
+    }
+    catch (HRESULT hrcXcpt) { hrc = hrcXcpt; }
+
+    if (SUCCEEDED(hrc))
+        hrc = i_resize((uint64_t)aLogicalSize, pMediumLockList, &pProgress, false /* aWait */, true /* aNotify */);
+
+    if (SUCCEEDED(hrc))
         pProgress.queryInterfaceTo(aProgress.asOutParam());
     else
         delete pMediumLockList;
 
-    return rc;
+    return hrc;
 }
 
@@ -4033,5 +3994,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -4170,5 +4131,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -4259,5 +4220,5 @@
 # endif
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     return rc;
@@ -4330,5 +4291,5 @@
 # endif
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     return rc;
@@ -5584,5 +5545,5 @@
         aTarget->m->state = MediumState_Creating;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -5952,5 +5913,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -6171,5 +6132,5 @@
         }
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     return rc;
@@ -6498,5 +6459,5 @@
         }
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (FAILED(rc))
@@ -6663,5 +6624,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -6827,5 +6788,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -6923,5 +6884,5 @@
             }
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
         catch (int aVRC)
         {
@@ -6934,5 +6895,5 @@
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     return rc;
@@ -7210,5 +7171,5 @@
             m->state = MediumState_Creating;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -7358,5 +7319,5 @@
             aTarget->m->state = MediumState_Creating;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -7894,7 +7855,7 @@
             success = true;
         }
-        catch (HRESULT aRC)
-        {
-            rc = aRC;
+        catch (HRESULT hrcXcpt)
+        {
+            rc = hrcXcpt;
         }
 
@@ -7908,7 +7869,7 @@
         }
     }
-    catch (HRESULT aRC)
-    {
-        rc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        rc = hrcXcpt;
     }
 
@@ -7989,14 +7950,14 @@
                     ComAssertRCThrow(vrc, E_FAIL);
                 }
-                catch (HRESULT aRC)
+                catch (HRESULT hrcXcpt)
                 {
-                    rc = aRC;
+                    rc = hrcXcpt;
                 }
 
                 VDDestroy(hdd);
             }
-            catch (HRESULT aRC)
-            {
-                rc = aRC;
+            catch (HRESULT hrcXcpt)
+            {
+                rc = hrcXcpt;
             }
 
@@ -9032,9 +8993,9 @@
                 variant = (MediumVariant_T)uImageFlags;
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -9230,9 +9191,9 @@
                 variant = (MediumVariant_T)uImageFlags;
         }
-        catch (HRESULT aRC) { rcTmp = aRC; }
+        catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rcTmp = aRC; }
+    catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
     MultiResult mrc(rcTmp);
@@ -9554,5 +9515,5 @@
             }
         }
-        catch (HRESULT aRC) { rcTmp = aRC; }
+        catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
         catch (int aVRC)
         {
@@ -9566,5 +9527,5 @@
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rcTmp = aRC; }
+    catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
     ErrorInfoKeeper eik;
@@ -9955,13 +9916,13 @@
                     variant = (MediumVariant_T)uImageFlags;
             }
-            catch (HRESULT aRC) { rcTmp = aRC; }
+            catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
             VDDestroy(targetHdd);
         }
-        catch (HRESULT aRC) { rcTmp = aRC; }
+        catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rcTmp = aRC; }
+    catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
     ErrorInfoKeeper eik;
@@ -10223,12 +10184,12 @@
 
             }
-            catch (HRESULT aRC) { rcOut = aRC; }
-
-        }
-        catch (HRESULT aRC) { rcOut = aRC; }
+            catch (HRESULT hrcXcpt) { rcOut = hrcXcpt; }
+
+        }
+        catch (HRESULT hrcXcpt) { rcOut = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rcOut = aRC; }
+    catch (HRESULT hrcXcpt) { rcOut = hrcXcpt; }
 
     ErrorInfoKeeper eik;
@@ -10306,9 +10267,9 @@
 
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     AutoWriteLock thisLock(this COMMA_LOCKVAL_SRC_POS);
@@ -10462,9 +10423,9 @@
                 variant = (MediumVariant_T)uImageFlags;
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     AutoWriteLock thisLock(this COMMA_LOCKVAL_SRC_POS);
@@ -10568,9 +10529,9 @@
             }
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (task.NotifyAboutChanges() && SUCCEEDED(rc))
@@ -10681,9 +10642,9 @@
             logicalSize = VDGetSize(hdd, VD_LAST_IMAGE);
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     if (SUCCEEDED(rc))
@@ -10871,13 +10832,13 @@
                     variant = (MediumVariant_T)uImageFlags;
             }
-            catch (HRESULT aRC) { rcTmp = aRC; }
+            catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
             VDDestroy(targetHdd);
         }
-        catch (HRESULT aRC) { rcTmp = aRC; }
+        catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
         VDDestroy(hdd);
     }
-    catch (HRESULT aRC) { rcTmp = aRC; }
+    catch (HRESULT hrcXcpt) { rcTmp = hrcXcpt; }
 
     ErrorInfoKeeper eik;
@@ -11212,5 +11173,5 @@
             m->pVirtualBox->i_saveModifiedRegistries();
         }
-        catch (HRESULT aRC) { rc = aRC; }
+        catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
         if (pvBuf)
@@ -11223,5 +11184,5 @@
 # endif
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     /* Everything is explicitly unlocked when the task exits,
Index: trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 98289)
@@ -2588,7 +2588,7 @@
         }
     }
-    catch (HRESULT aRC)
-    {
-        rc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        rc = hrcXcpt;
     }
 
@@ -3575,6 +3575,7 @@
         }
     }
-    catch (HRESULT aRC) {
-        mrc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        mrc = hrcXcpt;
     }
 
@@ -4141,5 +4142,5 @@
             throw rc;
     }
-    catch (HRESULT aRC) { rc = aRC; }
+    catch (HRESULT hrcXcpt) { rc = hrcXcpt; }
 
     // The callback mentioned above takes care of update the medium state
Index: trunk/src/VBox/Main/src-server/VFSExplorerImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/VFSExplorerImpl.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/VFSExplorerImpl.cpp	(revision 98289)
@@ -314,7 +314,7 @@
                 aTask->m_ptrProgress->SetCurrentOperationProgress(66);
         }
-        catch (HRESULT aRC)
-        {
-            rc = aRC;
+        catch (HRESULT hrcXcpt)
+        {
+            rc = hrcXcpt;
         }
 
@@ -374,7 +374,7 @@
         }
     }
-    catch (HRESULT aRC)
-    {
-        rc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        rc = hrcXcpt;
     }
 
@@ -416,7 +416,7 @@
         rc = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
     }
-    catch (HRESULT aRC)
-    {
-        rc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        rc = hrcXcpt;
     }
 
@@ -534,7 +534,7 @@
         rc = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
     }
-    catch (HRESULT aRC)
-    {
-        rc = aRC;
+    catch (HRESULT hrcXcpt)
+    {
+        rc = hrcXcpt;
     }
 
Index: trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 98288)
+++ trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 98289)
@@ -868,7 +868,7 @@
             ComAssertThrow(m->pAsyncEventQ, E_FAIL);
         }
-        catch (HRESULT aRC)
-        {
-            hrc = aRC;
+        catch (HRESULT hrcXcpt)
+        {
+            hrc = hrcXcpt;
         }
     }
