Index: /trunk/src/VBox/Main/include/GuestDnDPrivate.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestDnDPrivate.h	(revision 78094)
+++ /trunk/src/VBox/Main/include/GuestDnDPrivate.h	(revision 78095)
@@ -369,8 +369,10 @@
 };
 
-/** Initial state. */
+/** Initial object context state / no state set. */
 #define DND_OBJCTX_STATE_NONE           0
-/** The header was received/sent. */
+/** The header was received / sent. */
 #define DND_OBJCTX_STATE_HAS_HDR        RT_BIT(0)
+/** Validation mask for object context state. */
+#define DND_OBJCTX_STATE_VALID_MASK     UINT32_C(0x00000001)
 
 /**
@@ -435,4 +437,5 @@
     bool isValid(void) const { return (pObjURI != NULL); }
 
+    /** Returns the current state. */
     uint32_t getState(void) const { return fState; }
 
@@ -444,5 +447,5 @@
 
         fIntermediate = false;
-        fState        = 0;
+        fState        = DND_OBJCTX_STATE_NONE;
     }
 
@@ -456,7 +459,13 @@
     }
 
+    /**
+     * Sets the new state.
+     *
+     * @returns The new state, if set.
+     * @param   fStateNew       New state to set.
+     */
     uint32_t setState(uint32_t fStateNew)
     {
-        /** @todo Add validation. */
+        AssertReturn(!(fStateNew & ~DND_OBJCTX_STATE_VALID_MASK), fState /* Return old state */);
         fState = fStateNew;
         return fState;
