Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 56506)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 56507)
@@ -1504,4 +1504,5 @@
     if (!dragAndDropIsActive())
         rc = VERR_ACCESS_DENIED;
+#ifdef VBOX_WITH_DRAG_AND_DROP_GH
     else if (!m_fIsDraggingFromGuest)
     {
@@ -1514,4 +1515,7 @@
     else /* Already dragging, so report success. */
         rc = VINF_SUCCESS;
+#else
+    rc = VERR_NOT_SUPPORTED;
+#endif
 
     LogRel3(("DnD: dragCheckPending ended with rc=%Rrc\n", rc));
@@ -1525,4 +1529,5 @@
     if (!dragAndDropIsActive())
         rc = VERR_ACCESS_DENIED;
+#ifdef VBOX_WITH_DRAG_AND_DROP_GH
     else if (!m_fIsDraggingFromGuest)
         rc = VERR_WRONG_ORDER;
@@ -1535,4 +1540,7 @@
         m_fIsDraggingFromGuest = false;
     }
+#else
+    rc = VERR_NOT_SUPPORTED;
+#endif
 
     LogRel3(("DnD: dragStart ended with rc=%Rrc\n", rc));
@@ -1546,8 +1554,12 @@
     if (!dragAndDropIsActive())
         rc = VERR_ACCESS_DENIED;
+#ifdef VBOX_WITH_DRAG_AND_DROP_GH
     else if (!m_fIsDraggingFromGuest)
         rc = VERR_WRONG_ORDER;
     else
         rc = m_pDnDHandler->dragStop(screenId());
+#else
+    rc = VERR_NOT_SUPPORTED;
+#endif
 
     LogRel3(("DnD: dragStop ended with rc=%Rrc\n", rc));
