Index: trunk/src/VBox/GuestHost/DragAndDrop/DnDTransferList.cpp
===================================================================
--- trunk/src/VBox/GuestHost/DragAndDrop/DnDTransferList.cpp	(revision 85428)
+++ trunk/src/VBox/GuestHost/DragAndDrop/DnDTransferList.cpp	(revision 85429)
@@ -192,6 +192,6 @@
                 const bool fIsFile = RTFS_IS_FILE(fMode);
 
-                rc = DnDTransferObjectInit(pObj, fIsFile ? DNDTRANSFEROBJTYPE_FILE : DNDTRANSFEROBJTYPE_DIRECTORY,
-                                           pList->pszPathRootAbs, &pcszSrcAbs[idxPathToAdd]);
+                rc = DnDTransferObjectInitEx(pObj, fIsFile ? DNDTRANSFEROBJTYPE_FILE : DNDTRANSFEROBJTYPE_DIRECTORY,
+                                             pList->pszPathRootAbs, &pcszSrcAbs[idxPathToAdd]);
                 if (RT_SUCCESS(rc))
                 {
Index: trunk/src/VBox/GuestHost/DragAndDrop/DnDTransferObject.cpp
===================================================================
--- trunk/src/VBox/GuestHost/DragAndDrop/DnDTransferObject.cpp	(revision 85428)
+++ trunk/src/VBox/GuestHost/DragAndDrop/DnDTransferObject.cpp	(revision 85429)
@@ -42,4 +42,34 @@
 
 /**
+ * Initializes the object, internal version.
+ *
+ * @returns VBox status code.
+ * @param   pObj                DnD transfer object to initialize.
+ */
+static int dndTransferObjectInitInternal(PDNDTRANSFEROBJECT pObj)
+{
+    AssertPtrReturn(pObj, VERR_INVALID_POINTER);
+
+    pObj->enmType = DNDTRANSFEROBJTYPE_UNKNOWN;
+    pObj->idxDst  = 0;
+    pObj->pszPath = NULL;
+
+    RT_ZERO(pObj->u);
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Initializes the object.
+ *
+ * @returns VBox status code.
+ * @param   pObj                DnD transfer object to initialize.
+ */
+int DnDTransferObjectInit(PDNDTRANSFEROBJECT pObj)
+{
+    return dndTransferObjectInitInternal(pObj);
+}
+
+/**
  * Initializes the object with an expected object type and file path.
  *
@@ -51,5 +81,6 @@
  *                              Together with \a pcszPathSrcAbs this represents the complete absolute local path.
  */
-int DnDTransferObjectInit(PDNDTRANSFEROBJECT pObj, DNDTRANSFEROBJTYPE enmType, const char *pcszPathSrcAbs, const char *pcszPathDst)
+int DnDTransferObjectInitEx(PDNDTRANSFEROBJECT pObj,
+                            DNDTRANSFEROBJTYPE enmType, const char *pcszPathSrcAbs, const char *pcszPathDst)
 {
     AssertPtrReturn(pObj, VERR_INVALID_POINTER);
@@ -58,26 +89,9 @@
     AssertPtrReturn(pcszPathDst, VERR_INVALID_POINTER);
 
-    switch (enmType)
-    {
-        case DNDTRANSFEROBJTYPE_FILE:
-        {
-            pObj->u.File.hFile = NIL_RTFILE;
-            break;
-        }
-
-        case DNDTRANSFEROBJTYPE_DIRECTORY:
-        {
-            pObj->u.Dir.hDir = NIL_RTDIR;
-            break;
-        }
-
-        default:
-            AssertFailedReturn(VERR_NOT_IMPLEMENTED);
-            break; /* Never reached */
-    }
-
-    int rc = DnDPathValidate(pcszPathDst, false /* Does not need to exist */);
-    if (RT_FAILURE(rc))
-        return rc;
+    int rc = dndTransferObjectInitInternal(pObj);
+    AssertRCReturn(rc, rc);
+
+    rc = DnDPathValidate(pcszPathDst, false /* Does not need to exist */);
+    AssertRCReturn(rc, rc);
 
     char szPath[RTPATH_MAX + 1];
Index: trunk/src/VBox/GuestHost/DragAndDrop/testcase/tstDnDTransferObject.cpp
===================================================================
--- trunk/src/VBox/GuestHost/DragAndDrop/testcase/tstDnDTransferObject.cpp	(revision 85428)
+++ trunk/src/VBox/GuestHost/DragAndDrop/testcase/tstDnDTransferObject.cpp	(revision 85429)
@@ -48,9 +48,9 @@
      * Paths handling.
      */
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_FILE, "", "/rel/path/to/dst"));
-    RTTEST_CHECK_RC   (hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_FILE, "", "/rel/path/to/dst"), VERR_WRONG_ORDER);
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_FILE, "", "/rel/path/to/dst"));
+    RTTEST_CHECK_RC   (hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_FILE, "", "/rel/path/to/dst"), VERR_WRONG_ORDER);
     DnDTransferObjectReset(&Obj);
 
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_FILE, "/src/path1", "dst/path2"));
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_FILE, "/src/path1", "dst/path2"));
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetSourcePath(&Obj), "/src/path1/dst/path2") == 0);
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetDestPath(&Obj), "dst/path2") == 0);
@@ -58,23 +58,23 @@
                         && RTStrCmp(szBuf, "dst\\path2") == 0);
     DnDTransferObjectReset(&Obj);
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_FILE, "", "dst/with/ending/slash/"));
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_FILE, "", "dst/with/ending/slash/"));
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetDestPath(&Obj), "dst/with/ending/slash/") == 0);
     RTTEST_CHECK(hTest,    DnDTransferObjectGetDestPathEx(&Obj, DNDTRANSFEROBJPATHSTYLE_TRANSPORT, szBuf, sizeof(szBuf)) == VINF_SUCCESS
                         && RTStrCmp(szBuf, "dst/with/ending/slash/") == 0);
     DnDTransferObjectReset(&Obj);
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "", "dst/path2"));
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "", "dst/path2"));
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetSourcePath(&Obj), "dst/path2/") == 0);
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetDestPath(&Obj), "dst/path2/") == 0);
     DnDTransferObjectReset(&Obj);
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "", "dst\\to\\path2"));
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "", "dst\\to\\path2"));
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetSourcePath(&Obj), "dst/to/path2/") == 0);
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetDestPath(&Obj), "dst/to/path2/") == 0);
     DnDTransferObjectReset(&Obj);
     /* Test that the destination does not have a beginning slash. */
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/path2", "/dst/to/path2/"));
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/path2", "/dst/to/path2/"));
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetSourcePath(&Obj), "/src/path2/dst/to/path2/") == 0);
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetDestPath(&Obj), "dst/to/path2/") == 0);
     DnDTransferObjectReset(&Obj);
-    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/path2", "//////dst/to/path2/"));
+    RTTEST_CHECK_RC_OK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/path2", "//////dst/to/path2/"));
     RTTEST_CHECK(hTest, RTStrCmp(DnDTransferObjectGetDestPath(&Obj), "dst/to/path2/") == 0);
 
@@ -83,6 +83,6 @@
      */
     DnDTransferObjectReset(&Obj);
-    RTTEST_CHECK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/path3", "../../dst/path3") == VERR_INVALID_PARAMETER);
-    RTTEST_CHECK(hTest, DnDTransferObjectInit(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/../../path3", "dst/path3") == VERR_INVALID_PARAMETER);
+    RTTEST_CHECK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/path3", "../../dst/path3") == VERR_INVALID_PARAMETER);
+    RTTEST_CHECK(hTest, DnDTransferObjectInitEx(&Obj, DNDTRANSFEROBJTYPE_DIRECTORY, "/src/../../path3", "dst/path3") == VERR_INVALID_PARAMETER);
 
     /*
