Index: trunk/src/VBox/Main/include/GuestDnDPrivate.h
===================================================================
--- trunk/src/VBox/Main/include/GuestDnDPrivate.h	(revision 98272)
+++ trunk/src/VBox/Main/include/GuestDnDPrivate.h	(revision 98273)
@@ -68,5 +68,5 @@
     GuestDnDCallbackEvent(void)
         : m_SemEvent(NIL_RTSEMEVENT)
-        , m_Rc(VINF_SUCCESS) { }
+        , m_vrc(VINF_SUCCESS) { }
 
     virtual ~GuestDnDCallbackEvent(void);
@@ -76,7 +76,7 @@
     int Reset(void);
 
-    int Notify(int rc = VINF_SUCCESS);
-
-    int Result(void) const { return m_Rc; }
+    int Notify(int vrc = VINF_SUCCESS);
+
+    int Result(void) const { return m_vrc; }
 
     int Wait(RTMSINTERVAL msTimeout);
@@ -87,5 +87,5 @@
     RTSEMEVENT m_SemEvent;
     /** Callback result. */
-    int        m_Rc;
+    int        m_vrc;
 };
 
@@ -124,6 +124,6 @@
         if (cbAllocatedTmp > cbAllocated)
         {
-            int rc = resize(cbAllocatedTmp);
-            if (RT_FAILURE(rc))
+            int vrc = resize(cbAllocatedTmp);
+            if (RT_FAILURE(vrc))
                 return 0;
         }
@@ -440,6 +440,6 @@
     {
         RT_ZERO(List);
-        int rc2 = DnDTransferListInit(&List);
-        AssertRC(rc2);
+        int vrc2 = DnDTransferListInit(&List);
+        AssertRC(vrc2);
     }
 
@@ -506,14 +506,14 @@
     {
         RT_ZERO(DroppedFiles);
-        int rc2 = DnDDroppedFilesInit(&DroppedFiles);
-        AssertRC(rc2);
+        int vrc2 = DnDDroppedFilesInit(&DroppedFiles);
+        AssertRC(vrc2);
 
         RT_ZERO(List);
-        rc2 = DnDTransferListInit(&List);
-        AssertRC(rc2);
+        vrc2 = DnDTransferListInit(&List);
+        AssertRC(vrc2);
 
         RT_ZERO(ObjCur);
-        rc2 = DnDTransferObjectInit(&ObjCur);
-        AssertRC(rc2);
+        vrc2 = DnDTransferObjectInit(&ObjCur);
+        AssertRC(vrc2);
     }
 
@@ -828,7 +828,7 @@
     /** @name Guest response handling.
      * @{ */
-    int notifyAboutGuestResponse(int rcGuest = VINF_SUCCESS);
-    int waitForGuestResponseEx(RTMSINTERVAL msTimeout = 3000, int *prcGuest = NULL);
-    int waitForGuestResponse(int *prcGuest = NULL);
+    int notifyAboutGuestResponse(int vrcGuest = VINF_SUCCESS);
+    int waitForGuestResponseEx(RTMSINTERVAL msTimeout = 3000, int *pvrcGuest = NULL);
+    int waitForGuestResponse(int *pvrcGuest = NULL);
     /** @} */
 
@@ -854,5 +854,6 @@
     bool isProgressCanceled(void) const;
     bool isProgressRunning(void) const;
-    int setProgress(unsigned uPercentage, uint32_t uState, int rcOp = VINF_SUCCESS, const Utf8Str &strMsg = "");
+    int setProgress(unsigned uPercentage, uint32_t uState, int vrcOp = VINF_SUCCESS,
+                    const Utf8Str &strMsg = Utf8Str::Empty /** @todo figure out what's the best way to pass empty Utf8Str by default - probably = Utf8Str() */);
     HRESULT resetProgress(const ComObjPtr<Guest>& pParent, const Utf8Str &strDesc);
     HRESULT queryProgressTo(IProgress **ppProgress);
@@ -883,5 +884,5 @@
     /** Last error reported from guest.
      *  Set to VERR_IPE_UNINITIALIZED_STATUS if not set yet. */
-    int                   m_rcGuest;
+    int                   m_vrcGuest;
     /** Default action to perform in case of a
      *  successful drop. */
@@ -951,5 +952,5 @@
     typedef std::list< ComObjPtr<GuestDnDTarget> > GuestDnDTgtList;
 
-    /** Constructor; will throw rc on failure. */
+    /** Constructor; will throw vrc on failure. */
     GuestDnD(const ComObjPtr<Guest>& pGuest);
     virtual ~GuestDnD(void);
Index: trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp	(revision 98272)
+++ trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp	(revision 98273)
@@ -162,33 +162,29 @@
 
 /*********************************************************************************************************************************
- * Internal macros.                                                                                                              *
- ********************************************************************************************************************************/
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 
 /** Tries locking the GuestDnD object and returns on failure. */
-#define GUESTDND_LOCK() \
-    { \
-        int rcLock = RTCritSectEnter(&m_CritSect); \
-        if (RT_FAILURE(rcLock)) \
-            return rcLock; \
-    }
+#define GUESTDND_LOCK() do { \
+        int const vrcLock = RTCritSectEnter(&m_CritSect); \
+        if (RT_SUCCESS(vrcLock)) { /* likely */ } else return vrcLock; \
+    } while (0)
 
 /** Tries locking the GuestDnD object and returns a_Ret failure. */
-#define GUESTDND_LOCK_RET(a_Ret) \
-    { \
-        int rcLock = RTCritSectEnter(&m_CritSect); \
-        if (RT_FAILURE(rcLock)) \
-            return a_Ret; \
-    }
+#define GUESTDND_LOCK_RET(a_Ret) do { \
+        int const vrcLock = RTCritSectEnter(&m_CritSect); \
+        if (RT_SUCCESS(vrcLock)) { /* likely */ } else return vrcLock; \
+    } while (0)
 
 /** Unlocks a formerly locked GuestDnD object. */
-#define GUESTDND_UNLOCK() \
-    { \
-        int rcUnlock = RTCritSectLeave(&m_CritSect); RT_NOREF(rcUnlock); \
-        AssertRC(rcUnlock); \
-    }
+#define GUESTDND_UNLOCK() do { \
+        int const vrcUnlock = RTCritSectLeave(&m_CritSect); \
+        AssertRC(vrcUnlock); \
+    } while (0)
+
 
 /*********************************************************************************************************************************
- * GuestDnDSendCtx implementation.                                                                                               *
- ********************************************************************************************************************************/
+*   GuestDnDSendCtx implementation.                                                                                              *
+*********************************************************************************************************************************/
 
 GuestDnDSendCtx::GuestDnDSendCtx(void)
@@ -208,13 +204,14 @@
     Transfer.reset();
 
-    int rc2 = EventCallback.Reset();
-    AssertRC(rc2);
+    int vrc2 = EventCallback.Reset();
+    AssertRC(vrc2);
 
     GuestDnDData::reset();
 }
 
+
 /*********************************************************************************************************************************
- * GuestDnDRecvCtx implementation.                                                                                               *
- ********************************************************************************************************************************/
+*   GuestDnDRecvCtx implementation.                                                                                              *
+*********************************************************************************************************************************/
 
 GuestDnDRecvCtx::GuestDnDRecvCtx(void)
@@ -237,13 +234,14 @@
     Transfer.reset();
 
-    int rc2 = EventCallback.Reset();
-    AssertRC(rc2);
+    int vrc2 = EventCallback.Reset();
+    AssertRC(vrc2);
 
     GuestDnDData::reset();
 }
 
+
 /*********************************************************************************************************************************
- * GuestDnDCallbackEvent implementation.                                                                                         *
- ********************************************************************************************************************************/
+*   GuestDnDCallbackEvent implementation.                                                                                        *
+*********************************************************************************************************************************/
 
 GuestDnDCallbackEvent::~GuestDnDCallbackEvent(void)
@@ -258,11 +256,11 @@
 int GuestDnDCallbackEvent::Reset(void)
 {
-    int rc = VINF_SUCCESS;
-
-    if (NIL_RTSEMEVENT == m_SemEvent)
-        rc = RTSemEventCreate(&m_SemEvent);
-
-    m_Rc = VINF_SUCCESS;
-    return rc;
+    int vrc = VINF_SUCCESS;
+
+    if (m_SemEvent == NIL_RTSEMEVENT)
+        vrc = RTSemEventCreate(&m_SemEvent);
+
+    m_vrc = VINF_SUCCESS;
+    return vrc;
 }
 
@@ -271,9 +269,9 @@
  *
  * @returns VBox status code.
- * @param   rc                  Result code to use for the event completion.
- */
-int GuestDnDCallbackEvent::Notify(int rc /* = VINF_SUCCESS */)
-{
-    m_Rc = rc;
+ * @param   vrc                 Result code to use for the event completion.
+ */
+int GuestDnDCallbackEvent::Notify(int vrc /* = VINF_SUCCESS */)
+{
+    m_vrc = vrc;
     return RTSemEventSignal(m_SemEvent);
 }
@@ -290,7 +288,8 @@
 }
 
-/********************************************************************************************************************************
- *
- ********************************************************************************************************************************/
+
+/*********************************************************************************************************************************
+*   GuestDnDState implementation                                                                                                 *
+*********************************************************************************************************************************/
 
 GuestDnDState::GuestDnDState(const ComObjPtr<Guest>& pGuest)
@@ -302,18 +301,18 @@
     reset();
 
-    int rc = RTCritSectInit(&m_CritSect);
-    if (RT_FAILURE(rc))
-        throw rc;
-    rc = RTSemEventCreate(&m_EventSem);
-    if (RT_FAILURE(rc))
-        throw rc;
+    int vrc = RTCritSectInit(&m_CritSect);
+    if (RT_FAILURE(vrc))
+        throw vrc;
+    vrc = RTSemEventCreate(&m_EventSem);
+    if (RT_FAILURE(vrc))
+        throw vrc;
 }
 
 GuestDnDState::~GuestDnDState(void)
 {
-    int rc = RTSemEventDestroy(m_EventSem);
-    AssertRC(rc);
-    rc = RTCritSectDelete(&m_CritSect);
-    AssertRC(rc);
+    int vrc = RTSemEventDestroy(m_EventSem);
+    AssertRC(vrc);
+    vrc = RTCritSectDelete(&m_CritSect);
+    AssertRC(vrc);
 }
 
@@ -322,10 +321,10 @@
  *
  * @returns VBox status code.
- * @param   rcGuest             Guest rc to set for the response.
- *                              Defaults to VINF_SUCCESS (for success).
- */
-int GuestDnDState::notifyAboutGuestResponse(int rcGuest /* = VINF_SUCCESS */)
-{
-    m_rcGuest = rcGuest;
+ * @param   vrcGuest    Guest VBox status code to set for the response.
+ *                      Defaults to VINF_SUCCESS (for success).
+ */
+int GuestDnDState::notifyAboutGuestResponse(int vrcGuest /* = VINF_SUCCESS */)
+{
+    m_vrcGuest = vrcGuest;
     return RTSemEventSignal(m_EventSem);
 }
@@ -346,5 +345,5 @@
     m_mapCallbacks.clear();
 
-    m_rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
+    m_vrcGuest = VERR_IPE_UNINITIALIZED_STATUS;
 }
 
@@ -409,5 +408,5 @@
     }
 
-    LogFlowFunc(("Returning rc=%Rrc\n", vrc));
+    LogFlowFunc(("Returning vrc=%Rrc\n", vrc));
     return vrc;
 }
@@ -426,13 +425,9 @@
     m_pProgress.setNull();
 
-    HRESULT hr = m_pProgress.createObject();
-    if (SUCCEEDED(hr))
-    {
-        hr = m_pProgress->init(static_cast<IGuest *>(pParent),
-                               Bstr(strDesc).raw(),
-                               TRUE /* aCancelable */);
-    }
-
-    return hr;
+    HRESULT hrc = m_pProgress.createObject();
+    if (SUCCEEDED(hrc))
+        hrc = m_pProgress->init(static_cast<IGuest *>(pParent), Bstr(strDesc).raw(), TRUE /* aCancelable */);
+
+    return hrc;
 }
 
@@ -448,6 +443,6 @@
 
     BOOL fCanceled;
-    HRESULT hr = m_pProgress->COMGETTER(Canceled)(&fCanceled);
-    AssertComRCReturn(hr, false);
+    HRESULT hrc = m_pProgress->COMGETTER(Canceled)(&fCanceled);
+    AssertComRCReturn(hrc, false);
     return RT_BOOL(fCanceled);
 }
@@ -464,6 +459,6 @@
 
     BOOL fCompleted;
-    HRESULT const hr = m_pProgress->COMGETTER(Completed)(&fCompleted);
-    AssertComRCReturn(hr, false);
+    HRESULT const hrc = m_pProgress->COMGETTER(Completed)(&fCompleted);
+    AssertComRCReturn(hrc, false);
     return !RT_BOOL(fCompleted);
 }
@@ -508,14 +503,12 @@
  * @param   uPercentage         Percentage (0-100) to set.
  * @param   uStatus             Status (of type DND_PROGRESS_XXX) to set.
- * @param   rcOp                IPRT-style result code to set. Optional.
+ * @param   vrcOp               VBox status code to set. Optional.
  * @param   strMsg              Message to set. Optional.
  */
 int GuestDnDState::setProgress(unsigned uPercentage, uint32_t uStatus,
-                               int rcOp /* = VINF_SUCCESS */, const Utf8Str &strMsg /* = "" */)
-{
-    LogFlowFunc(("uPercentage=%u, uStatus=%RU32, , rcOp=%Rrc, strMsg=%s\n",
-                 uPercentage, uStatus, rcOp, strMsg.c_str()));
-
-    HRESULT hr = S_OK;
+                               int vrcOp /* = VINF_SUCCESS */, const Utf8Str &strMsg /* = "" */)
+{
+    LogFlowFunc(("uPercentage=%u, uStatus=%RU32, , vrcOp=%Rrc, strMsg=%s\n",
+                 uPercentage, uStatus, vrcOp, strMsg.c_str()));
 
     if (m_pProgress.isNull())
@@ -523,14 +516,14 @@
 
     BOOL fCompleted = FALSE;
-    hr = m_pProgress->COMGETTER(Completed)(&fCompleted);
-    AssertComRCReturn(hr, VERR_COM_UNEXPECTED);
+    HRESULT hrc = m_pProgress->COMGETTER(Completed)(&fCompleted);
+    AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
 
     BOOL fCanceled  = FALSE;
-    hr = m_pProgress->COMGETTER(Canceled)(&fCanceled);
-    AssertComRCReturn(hr, VERR_COM_UNEXPECTED);
+    hrc = m_pProgress->COMGETTER(Canceled)(&fCanceled);
+    AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
 
     LogFlowFunc(("Progress fCompleted=%RTbool, fCanceled=%RTbool\n", fCompleted, fCanceled));
 
-    int rc = VINF_SUCCESS;
+    int vrc = VINF_SUCCESS;
 
     switch (uStatus)
@@ -538,10 +531,9 @@
         case DragAndDropSvc::DND_PROGRESS_ERROR:
         {
-            LogRel(("DnD: Guest reported error %Rrc\n", rcOp));
+            LogRel(("DnD: Guest reported error %Rrc\n", vrcOp));
 
             if (!fCompleted)
-                hr = m_pProgress->i_notifyComplete(VBOX_E_DND_ERROR,
-                                                   COM_IIDOF(IGuest),
-                                                   m_pParent->getComponentName(), strMsg.c_str());
+                hrc = m_pProgress->i_notifyComplete(VBOX_E_DND_ERROR, COM_IIDOF(IGuest),
+                                                    m_pParent->getComponentName(), strMsg.c_str());
             break;
         }
@@ -553,12 +545,12 @@
             if (!fCanceled)
             {
-                hr = m_pProgress->Cancel();
-                AssertComRC(hr);
+                hrc = m_pProgress->Cancel();
+                AssertComRC(hrc);
             }
 
             if (!fCompleted)
             {
-                hr = m_pProgress->i_notifyComplete(S_OK);
-                AssertComRC(hr);
+                hrc = m_pProgress->i_notifyComplete(S_OK);
+                AssertComRC(hrc);
             }
             break;
@@ -574,11 +566,11 @@
                 && !fCanceled)
             {
-                hr = m_pProgress->SetCurrentOperationProgress(uPercentage);
-                AssertComRCReturn(hr, VERR_COM_UNEXPECTED);
+                hrc = m_pProgress->SetCurrentOperationProgress(uPercentage);
+                AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
                 if (   uStatus     == DragAndDropSvc::DND_PROGRESS_COMPLETE
                     || uPercentage >= 100)
                 {
-                    hr = m_pProgress->i_notifyComplete(S_OK);
-                    AssertComRCReturn(hr, VERR_COM_UNEXPECTED);
+                    hrc = m_pProgress->i_notifyComplete(S_OK);
+                    AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
                 }
             }
@@ -590,6 +582,6 @@
     }
 
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -606,5 +598,5 @@
     LogFlowFunc(("u32Function=%RU32, pvParms=%p, cbParms=%RU32\n", u32Function, pvParms, cbParms));
 
-    int rc = VERR_WRONG_ORDER; /* Play safe. */
+    int vrc = VERR_WRONG_ORDER; /* Play safe. */
 
     /* Whether or not to try calling host-installed callbacks after successfully processing the message. */
@@ -625,5 +617,5 @@
             LogThisFunc(("Client connected, using protocol v%RU32\n", m_uProtocolVersion));
 
-            rc = VINF_SUCCESS;
+            vrc = VINF_SUCCESS;
             break;
         }
@@ -640,5 +632,5 @@
             LogThisFunc(("Client reported features: %#RX64\n", m_fGuestFeatures0));
 
-            rc = VINF_SUCCESS;
+            vrc = VINF_SUCCESS;
             break;
         }
@@ -650,5 +642,5 @@
         {
             LogThisFunc(("Client disconnected\n"));
-            rc = setProgress(100, DND_PROGRESS_CANCELLED, VINF_SUCCESS);
+            vrc = setProgress(100, DND_PROGRESS_CANCELLED, VINF_SUCCESS);
             break;
         }
@@ -664,5 +656,5 @@
 
             setActionDefault(pCBData->uAction);
-            rc = notifyAboutGuestResponse();
+            vrc = notifyAboutGuestResponse();
             break;
         }
@@ -678,20 +670,16 @@
                 || pCBData->cbFormat  > _64K /** @todo Make this configurable? */
                 || pCBData->pszFormat == NULL)
-            {
-                rc = VERR_INVALID_PARAMETER;
-            }
+                vrc = VERR_INVALID_PARAMETER;
             else if (!RTStrIsValidEncoding(pCBData->pszFormat))
-            {
-                rc = VERR_INVALID_PARAMETER;
-            }
+                vrc = VERR_INVALID_PARAMETER;
             else
             {
                 setFormats(GuestDnD::toFormatList(pCBData->pszFormat));
-                rc = VINF_SUCCESS;
+                vrc = VINF_SUCCESS;
             }
 
-            int rc2 = notifyAboutGuestResponse();
-            if (RT_SUCCESS(rc))
-                rc = rc2;
+            int vrc2 = notifyAboutGuestResponse();
+            if (RT_SUCCESS(vrc))
+                vrc = vrc2;
             break;
         }
@@ -705,7 +693,7 @@
             AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_EVT_PROGRESS == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = setProgress(pCBData->uPercentage, pCBData->uStatus, pCBData->rc);
-            if (RT_SUCCESS(rc))
-                rc = notifyAboutGuestResponse(pCBData->rc);
+            vrc = setProgress(pCBData->uPercentage, pCBData->uStatus, pCBData->rc);
+            if (RT_SUCCESS(vrc))
+                vrc = notifyAboutGuestResponse(pCBData->rc);
             break;
         }
@@ -725,11 +713,7 @@
                 || pCBData->cbFormat  > _64K /** @todo Make the maximum size configurable? */
                 || pCBData->pszFormat == NULL)
-            {
-                rc = VERR_INVALID_PARAMETER;
-            }
+                vrc = VERR_INVALID_PARAMETER;
             else if (!RTStrIsValidEncoding(pCBData->pszFormat))
-            {
-                rc = VERR_INVALID_PARAMETER;
-            }
+                vrc = VERR_INVALID_PARAMETER;
             else
             {
@@ -738,10 +722,10 @@
                 setActionsAllowed(pCBData->uAllActions);
 
-                rc = VINF_SUCCESS;
+                vrc = VINF_SUCCESS;
             }
 
-            int rc2 = notifyAboutGuestResponse();
-            if (RT_SUCCESS(rc))
-                rc = rc2;
+            int vrc2 = notifyAboutGuestResponse();
+            if (RT_SUCCESS(vrc))
+                vrc = vrc2;
             break;
         }
@@ -762,15 +746,15 @@
         {
             AssertPtr(it->second.pfnCallback);
-            rc = it->second.pfnCallback(u32Function, pvParms, cbParms, it->second.pvUser);
+            vrc = it->second.pfnCallback(u32Function, pvParms, cbParms, it->second.pvUser);
         }
         else
         {
             /* Invoke the default callback handler in case we don't have any registered callback above. */
-            rc = i_defaultCallback(u32Function, pvParms, cbParms, this /* pvUser */);
-        }
-    }
-
-    LogFlowFunc(("Returning rc=%Rrc\n", rc));
-    return rc;
+            vrc = i_defaultCallback(u32Function, pvParms, cbParms, this /* pvUser */);
+        }
+    }
+
+    LogFlowFunc(("Returning vrc=%Rrc\n", vrc));
+    return vrc;
 }
 
@@ -793,15 +777,16 @@
  * @retval  VERR_DND_GUEST_ERROR on an error reported back from the guest.
  * @param   msTimeout           Timeout (in ms) for waiting. Optional, waits 3000 ms if not specified.
- * @param   prcGuest            Where to return the guest error when VERR_DND_GUEST_ERROR is returned. Optional.
- */
-int GuestDnDState::waitForGuestResponseEx(RTMSINTERVAL msTimeout /* = 3000 */, int *prcGuest /* = NULL */)
+ * @param   pvrcGuest           Where to return the guest error when
+ *                              VERR_DND_GUEST_ERROR is returned. Optional.
+ */
+int GuestDnDState::waitForGuestResponseEx(RTMSINTERVAL msTimeout /* = 3000 */, int *pvrcGuest /* = NULL */)
 {
     int vrc = RTSemEventWait(m_EventSem, msTimeout);
     if (RT_SUCCESS(vrc))
     {
-        if (RT_FAILURE(m_rcGuest))
+        if (RT_FAILURE(m_vrcGuest))
             vrc = VERR_DND_GUEST_ERROR;
-        if (prcGuest)
-            *prcGuest = m_rcGuest;
+        if (pvrcGuest)
+            *pvrcGuest = m_vrcGuest;
     }
     return vrc;
@@ -814,11 +799,12 @@
  * @retval  VERR_TIMEOUT when waiting has timed out.
  * @retval  VERR_DND_GUEST_ERROR on an error reported back from the guest.
- * @param   prcGuest            Where to return the guest error when VERR_DND_GUEST_ERROR is returned. Optional.
+ * @param   pvrcGuest            Where to return the guest error when
+ *                               VERR_DND_GUEST_ERROR is returned. Optional.
  *
  * @note    Uses the default timeout of 3000 ms.
  */
-int GuestDnDState::waitForGuestResponse(int *prcGuest /* = NULL */)
-{
-    return waitForGuestResponseEx(3000 /* ms */, prcGuest);
+int GuestDnDState::waitForGuestResponse(int *pvrcGuest /* = NULL */)
+{
+    return waitForGuestResponseEx(3000 /* ms */, pvrcGuest);
 }
 
@@ -845,7 +831,7 @@
     }
 
-    int rc = RTCritSectInit(&m_CritSect);
-    if (RT_FAILURE(rc))
-        throw rc;
+    int vrc = RTCritSectInit(&m_CritSect);
+    if (RT_FAILURE(vrc))
+        throw vrc;
 
     /* List of supported default MIME types. */
@@ -888,15 +874,14 @@
     ComObjPtr<Console> pConsole = m_pGuest->i_getConsole();
     ComPtr<IDisplay> pDisplay;
-    HRESULT hr = pConsole->COMGETTER(Display)(pDisplay.asOutParam());
-    if (FAILED(hr))
-        return hr;
+    HRESULT hrc = pConsole->COMGETTER(Display)(pDisplay.asOutParam());
+    if (FAILED(hrc))
+        return hrc;
 
     ULONG dummy;
     LONG xShift, yShift;
     GuestMonitorStatus_T monitorStatus;
-    hr = pDisplay->GetScreenResolution(uScreenId, &dummy, &dummy, &dummy,
-                                       &xShift, &yShift, &monitorStatus);
-    if (FAILED(hr))
-        return hr;
+    hrc = pDisplay->GetScreenResolution(uScreenId, &dummy, &dummy, &dummy, &xShift, &yShift, &monitorStatus);
+    if (FAILED(hrc))
+        return hrc;
 
     if (puX)
@@ -1543,9 +1528,9 @@
     LogRel2(("DnD: Cancelling operation on guest ...\n"));
 
-    int rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-    if (RT_FAILURE(rc))
-        LogRel(("DnD: Cancelling operation on guest failed with %Rrc\n", rc));
-
-    return rc;
+    int vrc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
+    if (RT_FAILURE(vrc))
+        LogRel(("DnD: Cancelling operation on guest failed with %Rrc\n", vrc));
+
+    return vrc;
 }
 
@@ -1579,10 +1564,7 @@
     LogRel2(("DnD: Transfer %RU8%% complete\n", uPercent));
 
-    int rc = pState->setProgress(uPercent,
-                                   pData->isComplete()
-                                 ? DND_PROGRESS_COMPLETE
-                                 : DND_PROGRESS_RUNNING);
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    int vrc = pState->setProgress(uPercent, pData->isComplete() ? DND_PROGRESS_COMPLETE : DND_PROGRESS_RUNNING);
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -1600,5 +1582,5 @@
     AssertPtrReturn(pState, VERR_INVALID_POINTER);
 
-    int rc;
+    int vrc;
 
     LogFlowFunc(("msTimeout=%RU32\n", msTimeout));
@@ -1612,18 +1594,18 @@
          * respond, do busy waiting here.
          */
-        rc = pEvent->Wait(500 /* ms */);
-        if (RT_SUCCESS(rc))
-        {
-            rc = pEvent->Result();
-            LogFlowFunc(("Callback done, result is %Rrc\n", rc));
-            break;
-        }
-        else if (rc == VERR_TIMEOUT) /* Continue waiting. */
-            rc = VINF_SUCCESS;
+        vrc = pEvent->Wait(500 /* ms */);
+        if (RT_SUCCESS(vrc))
+        {
+            vrc = pEvent->Result();
+            LogFlowFunc(("Callback done, result is %Rrc\n", vrc));
+            break;
+        }
+        if (vrc == VERR_TIMEOUT) /* Continue waiting. */
+            vrc = VINF_SUCCESS;
 
         if (   msTimeout != RT_INDEFINITE_WAIT
             && RTTimeMilliTS() - tsStart > msTimeout)
         {
-            rc = VERR_TIMEOUT;
+            vrc = VERR_TIMEOUT;
             LogRel2(("DnD: Error: Guest did not respond within time\n"));
         }
@@ -1631,12 +1613,13 @@
         {
             LogRel2(("DnD: Operation was canceled by user\n"));
-            rc = VERR_CANCELLED;
-        }
-
-    } while (RT_SUCCESS(rc));
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
+            vrc = VERR_CANCELLED;
+        }
+
+    } while (RT_SUCCESS(vrc));
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
+}
+
 #endif /* VBOX_WITH_DRAG_AND_DROP */
 
Index: trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp	(revision 98272)
+++ trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp	(revision 98273)
@@ -392,5 +392,5 @@
     pState->set(VBOXDNDSTATE_UNKNOWN);
 
-    LogFlowFunc(("hr=%Rhrc\n", hrc));
+    LogFlowFunc(("hrc=%Rhrc\n", hrc));
     return hrc;
 #endif /* VBOX_WITH_DRAG_AND_DROP */
@@ -437,7 +437,7 @@
     GuestDnDState *pState = GuestDnDInst()->getState();
     AssertPtr(pState);
-    HRESULT hr = pState->resetProgress(m_pGuest, tr("Dropping data to host"));
-    if (FAILED(hr))
-        return hr;
+    HRESULT hrc = pState->resetProgress(m_pGuest, tr("Dropping data to host"));
+    if (FAILED(hrc))
+        return hrc;
 
     GuestDnDRecvDataTask *pTask = NULL;
@@ -458,5 +458,5 @@
             delete pTask;
             LogRel2(("DnD: Receive data task failed to initialize\n"));
-            throw hr = E_FAIL;
+            throw hrc = E_FAIL;
         }
 
@@ -466,31 +466,30 @@
         /* This function delete pTask in case of exceptions,
          * so there is no need in the call of delete operator. */
-        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_WORKER);
+        hrc = pTask->createThreadWithType(RTTHREADTYPE_MAIN_WORKER);
         pTask = NULL;  /* Note: pTask is now owned by the worker thread. */
     }
     catch (std::bad_alloc &)
     {
-        hr = E_OUTOFMEMORY;
+        hrc = E_OUTOFMEMORY;
     }
     catch (...)
     {
         LogRel2(("DnD: Could not create thread for data receiving task\n"));
-        hr = E_FAIL;
-    }
-
-    if (SUCCEEDED(hr))
+        hrc = E_FAIL;
+    }
+
+    if (SUCCEEDED(hrc))
     {
         /* Register ourselves at the DnD manager. */
         GuestDnDInst()->registerSource(this);
 
-        hr = pState->queryProgressTo(aProgress.asOutParam());
-        ComAssertComRC(hr);
-
+        hrc = pState->queryProgressTo(aProgress.asOutParam());
+        ComAssertComRC(hrc);
     }
     else
-        hr = i_setErrorAndReset(tr("Starting thread for GuestDnDSource failed (%Rhrc)"), hr);
-
-    LogFlowFunc(("Returning hr=%Rhrc\n", hr));
-    return hr;
+        hrc = i_setErrorAndReset(tr("Starting thread for GuestDnDSource failed (%Rhrc)"), hrc);
+
+    LogFlowFunc(("Returning hrc=%Rhrc\n", hrc));
+    return hrc;
 #endif /* VBOX_WITH_DRAG_AND_DROP */
 }
@@ -511,5 +510,5 @@
         return setError(E_FAIL, tr("Current drop operation to host still in progress"));
 
-    HRESULT hr = S_OK;
+    HRESULT hrc = S_OK;
 
     try
@@ -529,7 +528,7 @@
             char  *pszBuf = NULL;
             size_t cbBuf  = 0;
-            int rc = DnDTransferListGetRootsEx(&pCtx->Transfer.List, DNDTRANSFERLISTFMT_URI,
-                                               pcszDropDirAbs, DND_PATH_SEPARATOR_STR, &pszBuf, &cbBuf);
-            if (RT_SUCCESS(rc))
+            int vrc = DnDTransferListGetRootsEx(&pCtx->Transfer.List, DNDTRANSFERLISTFMT_URI,
+                                                pcszDropDirAbs, DND_PATH_SEPARATOR_STR, &pszBuf, &cbBuf);
+            if (RT_SUCCESS(vrc))
             {
                 Assert(cbBuf);
@@ -541,5 +540,5 @@
             }
             else
-                LogRel(("DnD: Unable to build source root list, rc=%Rrc\n", rc));
+                LogRel(("DnD: Unable to build source root list, vrc=%Rrc\n", vrc));
         }
         else /* Raw data. */
@@ -557,9 +556,9 @@
     catch (std::bad_alloc &)
     {
-        hr = E_OUTOFMEMORY;
-    }
-
-    LogFlowFunc(("Returning hr=%Rhrc\n", hr));
-    return hr;
+        hrc = E_OUTOFMEMORY;
+    }
+
+    LogFlowFunc(("Returning hrc=%Rhrc\n", hrc));
+    return hrc;
 #endif /* VBOX_WITH_DRAG_AND_DROP */
 }
@@ -719,5 +718,5 @@
     AssertPtrReturn(pSndData, VERR_INVALID_POINTER);
 
-    int rc = VINF_SUCCESS;
+    int vrc = VINF_SUCCESS;
 
     try
@@ -756,5 +755,5 @@
         {
             AssertMsgFailed(("Incoming data size invalid: cbData=%zu, cbTotal=%zu\n", cbData, cbTotalAnnounced));
-            rc = VERR_INVALID_PARAMETER;
+            vrc = VERR_INVALID_PARAMETER;
         }
         else if (   cbTotalAnnounced == 0
@@ -762,9 +761,9 @@
         {
             AssertMsgFailed(("cbTotal (%zu) is smaller than cbMeta (%zu)\n", cbTotalAnnounced, cbMetaAnnounced));
-            rc = VERR_INVALID_PARAMETER;
-        }
-
-        if (RT_FAILURE(rc))
-            return rc;
+            vrc = VERR_INVALID_PARAMETER;
+        }
+
+        if (RT_FAILURE(vrc))
+            return vrc;
 
         AssertReturn(cbData <= mData.mcbBlockSize, VERR_BUFFER_OVERFLOW);
@@ -788,12 +787,12 @@
             if (DnDMIMENeedsDropDir(pCtx->strFmtRecv.c_str(), pCtx->strFmtRecv.length()))
             {
-                rc = DnDTransferListInitEx(&pTransfer->List,
-                                           DnDDroppedFilesGetDirAbs(&pTransfer->DroppedFiles), DNDTRANSFERLISTFMT_NATIVE);
-                if (RT_SUCCESS(rc))
-                    rc = DnDTransferListAppendRootsFromBuffer(&pTransfer->List, DNDTRANSFERLISTFMT_URI,
-                                                              (const char *)pCtx->Meta.pvData, pCtx->Meta.cbData, DND_PATH_SEPARATOR_STR,
-                                                              DNDTRANSFERLIST_FLAGS_NONE);
+                vrc = DnDTransferListInitEx(&pTransfer->List,
+                                            DnDDroppedFilesGetDirAbs(&pTransfer->DroppedFiles), DNDTRANSFERLISTFMT_NATIVE);
+                if (RT_SUCCESS(vrc))
+                    vrc = DnDTransferListAppendRootsFromBuffer(&pTransfer->List, DNDTRANSFERLISTFMT_URI,
+                                                               (const char *)pCtx->Meta.pvData, pCtx->Meta.cbData,
+                                                               DND_PATH_SEPARATOR_STR, DNDTRANSFERLIST_FLAGS_NONE);
                 /* Validation. */
-                if (RT_SUCCESS(rc))
+                if (RT_SUCCESS(vrc))
                 {
                     uint64_t cRoots = DnDTransferListGetRootCount(&pTransfer->List);
@@ -806,35 +805,35 @@
                         LogRel(("DnD: Number of root entries invalid / mismatch: Got %RU64, expected %RU64\n",
                                 cRoots, pTransfer->cObjToProcess));
-                        rc = VERR_INVALID_PARAMETER;
+                        vrc = VERR_INVALID_PARAMETER;
                     }
                 }
 
-                if (RT_SUCCESS(rc))
+                if (RT_SUCCESS(vrc))
                 {
                     /* Update our process with the data we already received. */
-                    rc = updateProgress(pCtx, pCtx->pState, cbMetaAnnounced);
-                    AssertRC(rc);
+                    vrc = updateProgress(pCtx, pCtx->pState, cbMetaAnnounced);
+                    AssertRC(vrc);
                 }
 
-                if (RT_FAILURE(rc))
-                    LogRel(("DnD: Error building root entry list, rc=%Rrc\n", rc));
+                if (RT_FAILURE(vrc))
+                    LogRel(("DnD: Error building root entry list, vrc=%Rrc\n", vrc));
             }
             else /* Raw data. */
             {
-                rc = updateProgress(pCtx, pCtx->pState, cbData);
-                AssertRC(rc);
+                vrc = updateProgress(pCtx, pCtx->pState, cbData);
+                AssertRC(vrc);
             }
 
-            if (RT_FAILURE(rc))
-                LogRel(("DnD: Error receiving meta data, rc=%Rrc\n", rc));
+            if (RT_FAILURE(vrc))
+                LogRel(("DnD: Error receiving meta data, vrc=%Rrc\n", vrc));
         }
     }
     catch (std::bad_alloc &)
     {
-        rc = VERR_NO_MEMORY;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+        vrc = VERR_NO_MEMORY;
+    }
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -851,36 +850,33 @@
     const PDNDDROPPEDFILES   pDF  = &pCtx->Transfer.DroppedFiles;
 
-    int rc = DnDTransferObjectInitEx(pObj, DNDTRANSFEROBJTYPE_DIRECTORY,
-                                     DnDDroppedFilesGetDirAbs(pDF), pszPath);
-    if (RT_SUCCESS(rc))
+    int vrc = DnDTransferObjectInitEx(pObj, DNDTRANSFEROBJTYPE_DIRECTORY, DnDDroppedFilesGetDirAbs(pDF), pszPath);
+    if (RT_SUCCESS(vrc))
     {
         const char *pcszPathAbs = DnDTransferObjectGetSourcePath(pObj);
         AssertPtr(pcszPathAbs);
 
-        rc = RTDirCreateFullPath(pcszPathAbs, fMode);
-        if (RT_SUCCESS(rc))
+        vrc = RTDirCreateFullPath(pcszPathAbs, fMode);
+        if (RT_SUCCESS(vrc))
         {
             pCtx->Transfer.cObjProcessed++;
             if (pCtx->Transfer.cObjProcessed <= pCtx->Transfer.cObjToProcess)
-            {
-                rc = DnDDroppedFilesAddDir(pDF, pcszPathAbs);
-            }
+                vrc = DnDDroppedFilesAddDir(pDF, pcszPathAbs);
             else
-                rc = VERR_TOO_MUCH_DATA;
+                vrc = VERR_TOO_MUCH_DATA;
 
             DnDTransferObjectDestroy(pObj);
 
-            if (RT_FAILURE(rc))
+            if (RT_FAILURE(vrc))
                 LogRel2(("DnD: Created guest directory '%s' on host\n", pcszPathAbs));
         }
         else
-            LogRel(("DnD: Error creating guest directory '%s' on host, rc=%Rrc\n", pcszPathAbs, rc));
-    }
-
-    if (RT_FAILURE(rc))
-        LogRel(("DnD: Receiving guest directory '%s' failed with rc=%Rrc\n", pszPath, rc));
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+            LogRel(("DnD: Error creating guest directory '%s' on host, vrc=%Rrc\n", pcszPathAbs, vrc));
+    }
+
+    if (RT_FAILURE(vrc))
+        LogRel(("DnD: Receiving guest directory '%s' failed with vrc=%Rrc\n", pszPath, vrc));
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -915,5 +911,5 @@
                     ("Data transfer already complete, bailing out\n"), VERR_INVALID_PARAMETER);
 
-    int rc = VINF_SUCCESS;
+    int vrc = VINF_SUCCESS;
 
     do
@@ -925,5 +921,5 @@
         {
             AssertMsgFailed(("Object '%s' not complete yet\n", DnDTransferObjectGetSourcePath(pObj)));
-            rc = VERR_WRONG_ORDER;
+            vrc = VERR_WRONG_ORDER;
             break;
         }
@@ -931,6 +927,6 @@
         const PDNDDROPPEDFILES pDF = &pCtx->Transfer.DroppedFiles;
 
-        rc = DnDTransferObjectInitEx(pObj, DNDTRANSFEROBJTYPE_FILE, DnDDroppedFilesGetDirAbs(pDF), pszPath);
-        AssertRCBreak(rc);
+        vrc = DnDTransferObjectInitEx(pObj, DNDTRANSFEROBJTYPE_FILE, DnDDroppedFilesGetDirAbs(pDF), pszPath);
+        AssertRCBreak(vrc);
 
         const char *pcszSource = DnDTransferObjectGetSourcePath(pObj);
@@ -938,9 +934,9 @@
 
         /** @todo Add sparse file support based on fFlags? (Use Open(..., fFlags | SPARSE). */
-        rc = DnDTransferObjectOpen(pObj, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE,
+        vrc = DnDTransferObjectOpen(pObj, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE,
                                    (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR, DNDTRANSFEROBJECT_FLAGS_NONE);
-        if (RT_FAILURE(rc))
-        {
-            LogRel(("DnD: Error opening/creating guest file '%s' on host, rc=%Rrc\n", pcszSource, rc));
+        if (RT_FAILURE(vrc))
+        {
+            LogRel(("DnD: Error opening/creating guest file '%s' on host, vrc=%Rrc\n", pcszSource, vrc));
             break;
         }
@@ -948,5 +944,5 @@
         /* Note: Protocol v1 does not send any file sizes, so always 0. */
         if (m_pState->m_uProtocolVersion >= 2)
-            rc = DnDTransferObjectSetSize(pObj, cbSize);
+            vrc = DnDTransferObjectSetSize(pObj, cbSize);
 
         /** @todo Unescape path before printing. */
@@ -964,8 +960,8 @@
             {
                 /* Add for having a proper rollback. */
-                rc = DnDDroppedFilesAddFile(pDF, pcszSource);
+                vrc = DnDDroppedFilesAddFile(pDF, pcszSource);
             }
             else
-                rc = VERR_TOO_MUCH_DATA;
+                vrc = VERR_TOO_MUCH_DATA;
 
             DnDTransferObjectDestroy(pObj);
@@ -974,9 +970,9 @@
     } while (0);
 
-    if (RT_FAILURE(rc))
-        LogRel(("DnD: Error receiving guest file header, rc=%Rrc\n", rc));
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    if (RT_FAILURE(vrc))
+        LogRel(("DnD: Error receiving guest file header, vrc=%Rrc\n", vrc));
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -995,5 +991,5 @@
     AssertReturn(cbData, VERR_INVALID_PARAMETER);
 
-    int rc = VINF_SUCCESS;
+    int vrc = VINF_SUCCESS;
 
     LogFlowFunc(("pvData=%p, cbData=%RU32, cbBlockSize=%RU32\n", pvData, cbData, mData.mcbBlockSize));
@@ -1018,7 +1014,7 @@
 
         uint32_t cbWritten;
-        rc = DnDTransferObjectWrite(pObj, pvData, cbData, &cbWritten);
-        if (RT_FAILURE(rc))
-            LogRel(("DnD: Error writing guest file data for '%s', rc=%Rrc\n", pcszSource, rc));
+        vrc = DnDTransferObjectWrite(pObj, pvData, cbData, &cbWritten);
+        if (RT_FAILURE(vrc))
+            LogRel(("DnD: Error writing guest file data for '%s', vrc=%Rrc\n", pcszSource, vrc));
 
         Assert(cbWritten <= cbData);
@@ -1027,10 +1023,10 @@
             LogRel(("DnD: Only written %RU32 of %RU32 bytes of guest file '%s' -- disk full?\n",
                     cbWritten, cbData, pcszSource));
-            rc = VERR_IO_GEN_FAILURE; /** @todo Find a better rc. */
-            break;
-        }
-
-        rc = updateProgress(pCtx, pCtx->pState, cbWritten);
-        AssertRCBreak(rc);
+            vrc = VERR_IO_GEN_FAILURE; /** @todo Find a better vrc. */
+            break;
+        }
+
+        vrc = updateProgress(pCtx, pCtx->pState, cbWritten);
+        AssertRCBreak(vrc);
 
         if (DnDTransferObjectIsComplete(pObj))
@@ -1040,5 +1036,5 @@
             pCtx->Transfer.cObjProcessed++;
             if (pCtx->Transfer.cObjProcessed > pCtx->Transfer.cObjToProcess)
-                rc = VERR_TOO_MUCH_DATA;
+                vrc = VERR_TOO_MUCH_DATA;
 
             DnDTransferObjectDestroy(pObj);
@@ -1047,9 +1043,9 @@
     } while (0);
 
-    if (RT_FAILURE(rc))
-        LogRel(("DnD: Error receiving guest file data, rc=%Rrc\n", rc));
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    if (RT_FAILURE(vrc))
+        LogRel(("DnD: Error receiving guest file data, vrc=%Rrc\n", vrc));
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
@@ -1108,5 +1104,5 @@
     }
 
-    int rc = VINF_SUCCESS;
+    int vrc = VINF_SUCCESS;
 
     if (fFoundFormat)
@@ -1121,11 +1117,7 @@
         bool fURIData = DnDMIMENeedsDropDir(pCtx->strFmtRecv.c_str(), pCtx->strFmtRecv.length());
         if (fURIData)
-        {
-            rc = i_receiveTransferData(pCtx, msTimeout);
-        }
+            vrc = i_receiveTransferData(pCtx, msTimeout);
         else
-        {
-            rc = i_receiveRawData(pCtx, msTimeout);
-        }
+            vrc = i_receiveRawData(pCtx, msTimeout);
     }
     else /* Just inform the user (if verbose release logging is enabled). */
@@ -1136,10 +1128,10 @@
             LogRel(("DnD:\tFormat #%zu: %s\n", i, pCtx->lstFmtOffered.at(i).c_str()));
 
-        rc = VERR_NOT_SUPPORTED;
-    }
-
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("DnD: Receiving data from guest failed with %Rrc\n", rc));
+        vrc = VERR_NOT_SUPPORTED;
+    }
+
+    if (RT_FAILURE(vrc))
+    {
+        LogRel(("DnD: Receiving data from guest failed with %Rrc\n", vrc));
 
         /* Let the guest side know first. */
@@ -1150,6 +1142,6 @@
     }
 
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -1165,5 +1157,5 @@
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
 
-    int rc;
+    int vrc;
 
     LogFlowFuncEnter();
@@ -1176,15 +1168,13 @@
         return VERR_INVALID_POINTER;
 
-#define REGISTER_CALLBACK(x) \
-    do {                                                             \
-        rc = pState->setCallback(x, i_receiveRawDataCallback, pCtx); \
-        if (RT_FAILURE(rc))                                          \
-            return rc;                                               \
+#define REGISTER_CALLBACK(x) do { \
+        vrc = pState->setCallback(x, i_receiveRawDataCallback, pCtx); \
+        if (RT_FAILURE(vrc)) \
+            return vrc; \
     } while (0)
 
-#define UNREGISTER_CALLBACK(x)                                      \
-    do {                                                            \
-        int rc2 = pState->setCallback(x, NULL);                     \
-        AssertRC(rc2);                                              \
+#define UNREGISTER_CALLBACK(x) do { \
+        int vrc2 = pState->setCallback(x, NULL); \
+        AssertRC(vrc2); \
     } while (0)
 
@@ -1214,10 +1204,10 @@
         /* Make the initial call to the guest by telling that we initiated the "dropped" event on
          * the host and therefore now waiting for the actual raw data. */
-        rc = pInst->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-        if (RT_SUCCESS(rc))
-        {
-            rc = waitForEvent(&pCtx->EventCallback, pCtx->pState, msTimeout);
-            if (RT_SUCCESS(rc))
-                rc = pCtx->pState->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
+        vrc = pInst->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
+        if (RT_SUCCESS(vrc))
+        {
+            vrc = waitForEvent(&pCtx->EventCallback, pCtx->pState, msTimeout);
+            if (RT_SUCCESS(vrc))
+                vrc = pCtx->pState->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
         }
 
@@ -1237,7 +1227,7 @@
 #undef UNREGISTER_CALLBACK
 
-    if (RT_FAILURE(rc))
-    {
-        if (rc == VERR_CANCELLED) /* Transfer was cancelled by the host. */
+    if (RT_FAILURE(vrc))
+    {
+        if (vrc == VERR_CANCELLED) /* Transfer was cancelled by the host. */
         {
             /*
@@ -1246,22 +1236,22 @@
              * host side never must depend on anything from the guest.
              */
-            int rc2 = sendCancel();
-            AssertRC(rc2);
-
-            rc2 = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
-            AssertRC(rc2);
-        }
-        else if (rc != VERR_DND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
-        {
-            int rc2 = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR,
-                                                rc, GuestDnDSource::i_hostErrorToString(rc));
-            AssertRC(rc2);
-        }
-
-        rc = VINF_SUCCESS; /* The error was handled by the setProgress() calls above. */
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+            int vrc2 = sendCancel();
+            AssertRC(vrc2);
+
+            vrc2 = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
+            AssertRC(vrc2);
+        }
+        else if (vrc != VERR_DND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
+        {
+            int vrc2 = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR,
+                                                vrc, GuestDnDSource::i_hostErrorToString(vrc));
+            AssertRC(vrc2);
+        }
+
+        vrc = VINF_SUCCESS; /* The error was handled by the setProgress() calls above. */
+    }
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -1277,5 +1267,5 @@
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
 
-    int rc;
+    int vrc;
 
     LogFlowFuncEnter();
@@ -1288,15 +1278,13 @@
         return VERR_INVALID_POINTER;
 
-#define REGISTER_CALLBACK(x)                                              \
-    do {                                                                  \
-        rc = pState->setCallback(x, i_receiveTransferDataCallback, pCtx); \
-        if (RT_FAILURE(rc))                                               \
-            return rc;                                                    \
+#define REGISTER_CALLBACK(x) do { \
+        vrc = pState->setCallback(x, i_receiveTransferDataCallback, pCtx); \
+        if (RT_FAILURE(vrc)) \
+            return vrc; \
     } while (0)
 
-#define UNREGISTER_CALLBACK(x)                                       \
-    do {                                                             \
-        int rc2 = pState->setCallback(x, NULL);                      \
-        AssertRC(rc2);                                               \
+#define UNREGISTER_CALLBACK(x) do {  \
+        int vrc2 = pState->setCallback(x, NULL);  \
+        AssertRC(vrc2); \
     } while (0)
 
@@ -1320,9 +1308,9 @@
     do
     {
-        rc = DnDDroppedFilesOpenTemp(pDF, 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-        {
-            LogRel(("DnD: Opening dropped files directory '%s' on the host failed with rc=%Rrc\n",
-                    DnDDroppedFilesGetDirAbs(pDF), rc));
+        vrc = DnDDroppedFilesOpenTemp(pDF, 0 /* fFlags */);
+        if (RT_FAILURE(vrc))
+        {
+            LogRel(("DnD: Opening dropped files directory '%s' on the host failed with vrc=%Rrc\n",
+                    DnDDroppedFilesGetDirAbs(pDF), vrc));
             break;
         }
@@ -1341,14 +1329,14 @@
         /* Make the initial call to the guest by telling that we initiated the "dropped" event on
          * the host and therefore now waiting for the actual URI data. */
-        rc = pInst->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-        if (RT_SUCCESS(rc))
+        vrc = pInst->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
+        if (RT_SUCCESS(vrc))
         {
             LogFlowFunc(("Waiting ...\n"));
 
-            rc = waitForEvent(&pCtx->EventCallback, pCtx->pState, msTimeout);
-            if (RT_SUCCESS(rc))
-                rc = pCtx->pState->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
-
-            LogFlowFunc(("Waiting ended with rc=%Rrc\n", rc));
+            vrc = waitForEvent(&pCtx->EventCallback, pCtx->pState, msTimeout);
+            if (RT_SUCCESS(vrc))
+                vrc = pCtx->pState->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
+
+            LogFlowFunc(("Waiting ended with vrc=%Rrc\n", vrc));
         }
 
@@ -1370,12 +1358,12 @@
 #undef UNREGISTER_CALLBACK
 
-    if (RT_FAILURE(rc))
-    {
-        int rc2 = DnDDroppedFilesRollback(pDF);
-        if (RT_FAILURE(rc2))
+    if (RT_FAILURE(vrc))
+    {
+        int vrc2 = DnDDroppedFilesRollback(pDF);
+        if (RT_FAILURE(vrc2))
             LogRel(("DnD: Deleting left over temporary files failed (%Rrc), please remove directory '%s' manually\n",
-                    rc2, DnDDroppedFilesGetDirAbs(pDF)));
-
-        if (rc == VERR_CANCELLED)
+                    vrc2, DnDDroppedFilesGetDirAbs(pDF)));
+
+        if (vrc == VERR_CANCELLED)
         {
             /*
@@ -1384,18 +1372,17 @@
              * host side never must depend on anything from the guest.
              */
-            rc2 = sendCancel();
-            AssertRC(rc2);
-
-            rc2 = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
-            AssertRC(rc2);
+            vrc2 = sendCancel();
+            AssertRC(vrc2);
+
+            vrc2 = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
+            AssertRC(vrc2);
 
             /* Cancelling is not an error, just set success here. */
-            rc  = VINF_SUCCESS;
-        }
-        else if (rc != VERR_DND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
-        {
-            rc2 = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR,
-                                            rc, GuestDnDSource::i_hostErrorToString(rc));
-            AssertRC(rc2);
+            vrc  = VINF_SUCCESS;
+        }
+        else if (vrc != VERR_DND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
+        {
+            vrc2 = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR, vrc, GuestDnDSource::i_hostErrorToString(vrc2));
+            AssertRC(vrc2);
         }
     }
@@ -1403,6 +1390,6 @@
     DnDDroppedFilesClose(pDF);
 
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
 }
 
@@ -1427,7 +1414,7 @@
     LogFlowFunc(("pThis=%p, uMsg=%RU32\n", pThis, uMsg));
 
-    int rc = VINF_SUCCESS;
-
-    int rcCallback = VINF_SUCCESS; /* rc for the callback. */
+    int vrc = VINF_SUCCESS;
+
+    int vrcCallback = VINF_SUCCESS; /* vrc for the callback. */
     bool fNotify   = false;
 
@@ -1439,5 +1426,5 @@
 
         case GUEST_DND_FN_DISCONNECT:
-            rc = VERR_CANCELLED;
+            vrc = VERR_CANCELLED;
             break;
 
@@ -1450,5 +1437,5 @@
             AssertReturn(CB_MAGIC_DND_GH_SND_DATA_HDR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = pThis->i_onReceiveDataHdr(pCtx, &pCBData->data);
+            vrc = pThis->i_onReceiveDataHdr(pCtx, &pCBData->data);
             break;
         }
@@ -1460,5 +1447,5 @@
             AssertReturn(CB_MAGIC_DND_GH_SND_DATA == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = pThis->i_onReceiveData(pCtx, &pCBData->data);
+            vrc = pThis->i_onReceiveData(pCtx, &pCBData->data);
             break;
         }
@@ -1478,34 +1465,32 @@
             }
             else if (pCBData->rc == VERR_WRONG_ORDER)
-            {
-                rc = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
-            }
+                vrc = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
             else
-                rc = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
-                                               GuestDnDSource::i_guestErrorToString(pCBData->rc));
+                vrc = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
+                                                GuestDnDSource::i_guestErrorToString(pCBData->rc));
 
             LogRel3(("DnD: Guest reported data transfer error: %Rrc\n", pCBData->rc));
 
-            if (RT_SUCCESS(rc))
-                rcCallback = VERR_DND_GUEST_ERROR;
+            if (RT_SUCCESS(vrc))
+                vrcCallback = VERR_DND_GUEST_ERROR;
             break;
         }
 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
         default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    if (   RT_FAILURE(rc)
-        || RT_FAILURE(rcCallback))
+            vrc = VERR_NOT_SUPPORTED;
+            break;
+    }
+
+    if (   RT_FAILURE(vrc)
+        || RT_FAILURE(vrcCallback))
     {
         fNotify = true;
-        if (RT_SUCCESS(rcCallback))
-            rcCallback = rc;
-    }
-
-    if (RT_FAILURE(rc))
-    {
-        switch (rc)
+        if (RT_SUCCESS(vrcCallback))
+            vrcCallback = vrc;
+    }
+
+    if (RT_FAILURE(vrc))
+    {
+        switch (vrc)
         {
             case VERR_NO_DATA:
@@ -1518,5 +1503,5 @@
 
             default:
-                LogRel(("DnD: Error %Rrc occurred, aborting data transfer to host\n", rc));
+                LogRel(("DnD: Error %Rrc occurred, aborting data transfer to host\n", vrc));
                 break;
         }
@@ -1524,6 +1509,6 @@
         /* Unregister this callback. */
         AssertPtr(pCtx->pState);
-        int rc2 = pCtx->pState->setCallback(uMsg, NULL /* PFNGUESTDNDCALLBACK */);
-        AssertRC(rc2);
+        int vrc2 = pCtx->pState->setCallback(uMsg, NULL /* PFNGUESTDNDCALLBACK */);
+        AssertRC(vrc2);
     }
 
@@ -1532,15 +1517,15 @@
         fNotify = true;
 
-    LogFlowFunc(("cbProcessed=%RU64, cbExtra=%RU64, fNotify=%RTbool, rcCallback=%Rrc, rc=%Rrc\n",
-                 pCtx->cbProcessed, pCtx->cbExtra, fNotify, rcCallback, rc));
+    LogFlowFunc(("cbProcessed=%RU64, cbExtra=%RU64, fNotify=%RTbool, vrcCallback=%Rrc, vrc=%Rrc\n",
+                 pCtx->cbProcessed, pCtx->cbExtra, fNotify, vrcCallback, vrc));
 
     if (fNotify)
     {
-        int rc2 = pCtx->EventCallback.Notify(rcCallback);
-        AssertRC(rc2);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc; /* Tell the guest. */
+        int vrc2 = pCtx->EventCallback.Notify(vrcCallback);
+        AssertRC(vrc2);
+    }
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc; /* Tell the guest. */
 }
 
@@ -1565,7 +1550,7 @@
     LogFlowFunc(("pThis=%p, uMsg=%RU32\n", pThis, uMsg));
 
-    int rc = VINF_SUCCESS;
-
-    int rcCallback = VINF_SUCCESS; /* rc for the callback. */
+    int vrc = VINF_SUCCESS;
+
+    int vrcCallback = VINF_SUCCESS; /* vrc for the callback. */
     bool fNotify = false;
 
@@ -1577,5 +1562,5 @@
 
         case GUEST_DND_FN_DISCONNECT:
-            rc = VERR_CANCELLED;
+            vrc = VERR_CANCELLED;
             break;
 
@@ -1588,5 +1573,5 @@
             AssertReturn(CB_MAGIC_DND_GH_SND_DATA_HDR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = pThis->i_onReceiveDataHdr(pCtx, &pCBData->data);
+            vrc = pThis->i_onReceiveDataHdr(pCtx, &pCBData->data);
             break;
         }
@@ -1598,5 +1583,5 @@
             AssertReturn(CB_MAGIC_DND_GH_SND_DATA == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = pThis->i_onReceiveData(pCtx, &pCBData->data);
+            vrc = pThis->i_onReceiveData(pCtx, &pCBData->data);
             break;
         }
@@ -1608,5 +1593,5 @@
             AssertReturn(CB_MAGIC_DND_GH_SND_DIR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = pThis->i_onReceiveDir(pCtx, pCBData->pszPath, pCBData->cbPath, pCBData->fMode);
+            vrc = pThis->i_onReceiveDir(pCtx, pCBData->pszPath, pCBData->cbPath, pCBData->fMode);
             break;
         }
@@ -1618,6 +1603,6 @@
             AssertReturn(CB_MAGIC_DND_GH_SND_FILE_HDR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
 
-            rc = pThis->i_onReceiveFileHdr(pCtx, pCBData->pszFilePath, pCBData->cbFilePath,
-                                           pCBData->cbSize, pCBData->fMode, pCBData->fFlags);
+            vrc = pThis->i_onReceiveFileHdr(pCtx, pCBData->pszFilePath, pCBData->cbFilePath,
+                                            pCBData->cbSize, pCBData->fMode, pCBData->fFlags);
             break;
         }
@@ -1631,5 +1616,5 @@
             if (pThis->m_pState->m_uProtocolVersion <= 1)
             {
-                /**
+                /*
                  * Notes for protocol v1 (< VBox 5.0):
                  * - Every time this command is being sent it includes the file header,
@@ -1638,11 +1623,11 @@
                  *   appended data to the desired file. So just pass 0 as cbSize.
                  */
-                rc = pThis->i_onReceiveFileHdr(pCtx, pCBData->u.v1.pszFilePath, pCBData->u.v1.cbFilePath,
-                                               0 /* cbSize */, pCBData->u.v1.fMode, 0 /* fFlags */);
-                if (RT_SUCCESS(rc))
-                    rc = pThis->i_onReceiveFileData(pCtx, pCBData->pvData, pCBData->cbData);
+                vrc = pThis->i_onReceiveFileHdr(pCtx, pCBData->u.v1.pszFilePath, pCBData->u.v1.cbFilePath,
+                                                0 /* cbSize */, pCBData->u.v1.fMode, 0 /* fFlags */);
+                if (RT_SUCCESS(vrc))
+                    vrc = pThis->i_onReceiveFileData(pCtx, pCBData->pvData, pCBData->cbData);
             }
             else /* Protocol v2 and up. */
-                rc = pThis->i_onReceiveFileData(pCtx, pCBData->pvData, pCBData->cbData);
+                vrc = pThis->i_onReceiveFileData(pCtx, pCBData->pvData, pCBData->cbData);
             break;
         }
@@ -1662,34 +1647,32 @@
             }
             else if (pCBData->rc == VERR_WRONG_ORDER)
-            {
-                rc = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
-            }
+                vrc = pCtx->pState->setProgress(100, DND_PROGRESS_CANCELLED);
             else
-                rc = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
-                                               GuestDnDSource::i_guestErrorToString(pCBData->rc));
+                vrc = pCtx->pState->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
+                                                GuestDnDSource::i_guestErrorToString(pCBData->rc));
 
             LogRel3(("DnD: Guest reported file transfer error: %Rrc\n", pCBData->rc));
 
-            if (RT_SUCCESS(rc))
-                rcCallback = VERR_DND_GUEST_ERROR;
+            if (RT_SUCCESS(vrc))
+                vrcCallback = VERR_DND_GUEST_ERROR;
             break;
         }
 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
         default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    if (   RT_FAILURE(rc)
-        || RT_FAILURE(rcCallback))
+            vrc = VERR_NOT_SUPPORTED;
+            break;
+    }
+
+    if (   RT_FAILURE(vrc)
+        || RT_FAILURE(vrcCallback))
     {
         fNotify = true;
-        if (RT_SUCCESS(rcCallback))
-            rcCallback = rc;
-    }
-
-    if (RT_FAILURE(rc))
-    {
-        switch (rc)
+        if (RT_SUCCESS(vrcCallback))
+            vrcCallback = vrc;
+    }
+
+    if (RT_FAILURE(vrc))
+    {
+        switch (vrc)
         {
             case VERR_NO_DATA:
@@ -1702,5 +1685,5 @@
 
             default:
-                LogRel(("DnD: Error %Rrc occurred, aborting file transfer to host\n", rc));
+                LogRel(("DnD: Error %Rrc occurred, aborting file transfer to host\n", vrc));
                 break;
         }
@@ -1708,6 +1691,6 @@
         /* Unregister this callback. */
         AssertPtr(pCtx->pState);
-        int rc2 = pCtx->pState->setCallback(uMsg, NULL /* PFNGUESTDNDCALLBACK */);
-        AssertRC(rc2);
+        int vrc2 = pCtx->pState->setCallback(uMsg, NULL /* PFNGUESTDNDCALLBACK */);
+        AssertRC(vrc2);
     }
 
@@ -1715,19 +1698,18 @@
     if (   pCtx->Transfer.isComplete()
         && pCtx->isComplete())
-    {
         fNotify = true;
-    }
-
-    LogFlowFunc(("cbProcessed=%RU64, cbExtra=%RU64, fNotify=%RTbool, rcCallback=%Rrc, rc=%Rrc\n",
-                 pCtx->cbProcessed, pCtx->cbExtra, fNotify, rcCallback, rc));
+
+    LogFlowFunc(("cbProcessed=%RU64, cbExtra=%RU64, fNotify=%RTbool, vrcCallback=%Rrc, vrc=%Rrc\n",
+                 pCtx->cbProcessed, pCtx->cbExtra, fNotify, vrcCallback, vrc));
 
     if (fNotify)
     {
-        int rc2 = pCtx->EventCallback.Notify(rcCallback);
-        AssertRC(rc2);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc; /* Tell the guest. */
-}
-
+        int vrc2 = pCtx->EventCallback.Notify(
+            vrcCallback);
+        AssertRC(vrc2);
+    }
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc; /* Tell the guest. */
+}
+
