Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp	(revision 29884)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp	(revision 29885)
@@ -263,4 +263,28 @@
     RTStrFree(pszValue);
 
+    return rc;
+}
+
+
+/**
+ * Flushes the cache by writing every item regardless of its state.
+ *
+ * @param   pCache          The property cache.
+ */
+int VBoxServicePropCacheFlush(PVBOXSERVICEVEPROPCACHE pCache)
+{
+    AssertPtr(pCache);
+    int rc = VINF_SUCCESS;
+    PVBOXSERVICEVEPROPCACHEENTRY pNodeIt = NULL;
+    if (RT_SUCCESS(RTCritSectEnter(&pCache->CritSect)))
+    {
+        RTListForEach(&pCache->ListEntries, pNodeIt, VBOXSERVICEVEPROPCACHEENTRY, Node)
+        {
+            rc = VBoxServiceWritePropF(pCache->uClientID, pNodeIt->pszName, pNodeIt->pszValue);
+            if (RT_FAILURE(rc))
+                break;
+        }
+        RTCritSectLeave(&pCache->CritSect);
+    }
     return rc;
 }
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h	(revision 29884)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h	(revision 29885)
@@ -30,4 +30,5 @@
 int VBoxServicePropCacheUpdate(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, const char *pszValueFormat, ...);
 int VBoxServicePropCacheUpdateEx(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, uint32_t fFlags, const char *pszValueReset, const char *pszValueFormat, ...);
+int VBoxServicePropCacheFlush(PVBOXSERVICEVEPROPCACHE pCache);
 void VBoxServicePropCacheDestroy(PVBOXSERVICEVEPROPCACHE pCache);
 #endif
