Index: trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp	(revision 100545)
+++ trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp	(revision 100546)
@@ -192,39 +192,4 @@
 
 /**
- * @copydoc SharedClipboardWinDataObject::CALLBACKS::pfnTransferEnd
- *
- * Called by SharedClipboardWinDataObject when the assigned transfer has been ended.
- *
- * @thread  Clipboard main thread.
- */
-static DECLCALLBACK(int) vbtrShClDataObjectTransferEndCallback(SharedClipboardWinDataObject::PCALLBACKCTX pCbCtx,
-                                                               PSHCLTRANSFER pTransfer, int rcTransfer)
-{
-    LogFlowFuncEnter();
-
-    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pCbCtx->pvUser;
-    AssertPtr(pCtx);
-
-    SHCLTRANSFERSTATUS enmSts;
-
-    switch (rcTransfer)
-    {
-        case VERR_CANCELLED:
-            enmSts = SHCLTRANSFERSTATUS_CANCELED;
-            break;
-
-        default:
-            enmSts =   RT_SUCCESS(rcTransfer)
-                     ? SHCLTRANSFERSTATUS_UNINITIALIZED : SHCLTRANSFERSTATUS_ERROR;
-            break;
-    }
-
-    int rc = VbglR3ClipboardTransferStatusReply(&pCtx->CmdCtx, pTransfer, enmSts,
-                                                enmSts == SHCLTRANSFERSTATUS_ERROR ? rcTransfer : VINF_SUCCESS);
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
  * @copydoc SHCLTRANSFERCALLBACKS::pfnOnCreated
  *
@@ -393,6 +358,28 @@
     AssertPtr(pCtx);
 
+    LogFlowFunc(("rcCompletion=%Rrc\n", rcCompletion));
+
     LogRel2(("Shared Clipboard: Transfer %RU16 %s\n",
              ShClTransferGetID(pCbCtx->pTransfer), rcCompletion == VERR_CANCELLED ? "canceled" : "complete"));
+
+    SHCLTRANSFERSTATUS enmSts;
+
+    switch (rcCompletion)
+    {
+        case VERR_CANCELLED:
+            enmSts = SHCLTRANSFERSTATUS_CANCELED;
+            break;
+
+        case VINF_SUCCESS:
+            enmSts = SHCLTRANSFERSTATUS_STOPPED;
+            break;
+
+        default:
+            AssertFailedStmt(enmSts = SHCLTRANSFERSTATUS_ERROR);
+            break;
+    }
+
+    int rc = VbglR3ClipboardTransferStatusReply(&pCtx->CmdCtx, pCbCtx->pTransfer, enmSts, rcCompletion);
+    LogFlowFuncLeaveRC(rc);
 }
 
@@ -404,6 +391,23 @@
 
     LogRel(("Shared Clipboard: Transfer %RU16 failed with %Rrc\n", ShClTransferGetID(pCbCtx->pTransfer), rcError));
-}
-
+
+    if (g_cVerbosity) /* Only show this in verbose mode. */
+    {
+        char szMsg  [256]; /* Sizes according to MSDN. */
+        char szTitle[64];
+
+        /** @todo Add some translation macros here. */
+        RTStrPrintf(szTitle, sizeof(szTitle), "VirtualBox Shared Clipboard");
+        RTStrPrintf(szMsg, sizeof(szMsg),
+                    "Transfer %RU16 failed with %Rrc", ShClTransferGetID(pCbCtx->pTransfer), rcError);
+
+        hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
+                          szMsg, szTitle,
+                          5000 /* Time to display in msec */, NIIF_INFO);
+    }
+
+    int rc = VbglR3ClipboardTransferStatusReply(&pCtx->CmdCtx, pCbCtx->pTransfer, SHCLTRANSFERSTATUS_ERROR, rcError);
+    LogFlowFuncLeaveRC(rc);
+}
 #endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
 
@@ -751,5 +755,4 @@
                     RT_ZERO(Callbacks);
                     Callbacks.pfnTransferBegin = vbtrShClDataObjectTransferBeginCallback;
-                    Callbacks.pfnTransferEnd   = vbtrShClDataObjectTransferEndCallback;
 
                     rc = SharedClipboardWinTransferCreateAndSetDataObject(pWinCtx, pCtx, &Callbacks);
Index: trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
===================================================================
--- trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp	(revision 100545)
+++ trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp	(revision 100546)
@@ -562,6 +562,4 @@
                         break;
 
-                    int rcTransfer = VERR_IPE_UNINITIALIZED_STATUS;
-
                     switch (pThis->m_enmStatus)
                     {
@@ -579,15 +577,15 @@
                         case Completed:
                             LogRel2(("Shared Clipboard: Data object: Transfer complete\n"));
-                            rcTransfer = VINF_SUCCESS;
+                            rc = ShClTransferComplete(pTransfer);
                             break;
 
                         case Canceled:
                             LogRel2(("Shared Clipboard: Data object: Transfer canceled\n"));
-                            rcTransfer = VERR_CANCELLED;
+                            rc = ShClTransferCancel(pTransfer);
                             break;
 
                         case Error:
                             LogRel(("Shared Clipboard: Data object: Transfer error %Rrc occurred\n", pThis->m_rcStatus));
-                            rcTransfer = pThis->m_rcStatus;
+                            rc = ShClTransferError(pTransfer, pThis->m_rcStatus);
                             break;
 
@@ -600,5 +598,9 @@
 
                     if (pThis->m_Callbacks.pfnTransferEnd)
-                        rc = pThis->m_Callbacks.pfnTransferEnd(&pThis->m_CallbackCtx, pTransfer, rcTransfer);
+                    {
+                        int rc2 = pThis->m_Callbacks.pfnTransferEnd(&pThis->m_CallbackCtx, pTransfer, pThis->m_rcStatus);
+                        if (RT_SUCCESS(rc))
+                            rc = rc2;
+                    }
 
                     pThis->lock();
@@ -613,5 +615,5 @@
 
     if (RT_FAILURE(rc))
-        LogRel(("Shared Clipboard: Transfer failed with %Rrc\n", rc));
+        LogRel(("Shared Clipboard: Transfer read thread failed with %Rrc\n", rc));
 
     LogFlowFuncLeaveRC(rc);
