Index: /trunk/src/VBox/HostServices/GuestProperties/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75983)
+++ /trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75984)
@@ -48,4 +48,5 @@
 #include <iprt/cpp/autores.h>
 #include <iprt/cpp/utils.h>
+#include <iprt/cpp/ministring.h>
 #include <iprt/err.h>
 #include <iprt/mem.h>
@@ -57,5 +58,4 @@
 #include <VBox/version.h>
 
-#include <string>
 #include <list>
 
@@ -73,7 +73,7 @@
     RTSTRSPACECORE mStrCore;
     /** The name of the property */
-    std::string mName;
+    RTCString mName;
     /** The property value */
-    std::string mValue;
+    RTCString mValue;
     /** The timestamp of the property */
     uint64_t mTimestamp;
@@ -87,8 +87,9 @@
     }
     /** Constructor with const char * */
-    Property(const char *pcszName, const char *pcszValue,
-             uint64_t u64Timestamp, uint32_t u32Flags)
-        : mName(pcszName), mValue(pcszValue), mTimestamp(u64Timestamp),
-          mFlags(u32Flags)
+    Property(const char *pcszName, const char *pcszValue, uint64_t nsTimestamp, uint32_t u32Flags)
+        : mName(pcszName)
+        , mValue(pcszValue)
+        , mTimestamp(nsTimestamp)
+        , mFlags(u32Flags)
     {
         RT_ZERO(mStrCore);
@@ -96,8 +97,9 @@
     }
     /** Constructor with std::string */
-    Property(std::string name, std::string value, uint64_t u64Timestamp,
-             uint32_t u32Flags)
-        : mName(name), mValue(value), mTimestamp(u64Timestamp),
-          mFlags(u32Flags)
+    Property(RTCString const &rName, RTCString const &rValue, uint64_t nsTimestamp, uint32_t fFlags)
+        : mName(rName)
+        , mValue(rValue)
+        , mTimestamp(nsTimestamp)
+        , mFlags(fFlags)
     {}
 
@@ -129,5 +131,5 @@
     bool isNull()
     {
-        return mName.empty();
+        return mName.isEmpty();
     }
 };
@@ -234,5 +236,5 @@
         for (;    it != mGuestNotifications.end()
                && it->mTimestamp != u64Timestamp; ++it)
-            {}
+        { /*nothing*/ }
         if (it == mGuestNotifications.end())  /* Not found */
             it = mGuestNotifications.begin();
@@ -668,5 +670,5 @@
             /* Check that the buffer is big enough */
             size_t const cbFlags  = strlen(szFlags) + 1;
-            size_t const cbValue  = pProp->mValue.size() + 1;
+            size_t const cbValue  = pProp->mValue.length() + 1;
             size_t const cbNeeded = cbValue + cbFlags;
             HGCMSvcSetU32(&paParms[3], (uint32_t)cbNeeded);
@@ -1085,9 +1087,6 @@
 
     /* Format the data to write to the buffer. */
-    std::string buffer;
-    uint64_t u64Timestamp;
-    char *pchBuf;
+    char    *pchBuf;
     uint32_t cbBuf;
-
     int rc = HGCMSvcGetBuf(&paParms[2], (void **)&pchBuf, &cbBuf);
     if (RT_SUCCESS(rc))
@@ -1097,22 +1096,21 @@
         if (RT_SUCCESS(rc))
         {
-            buffer += prop.mName;
-            buffer += '\0';
-            buffer += prop.mValue;
-            buffer += '\0';
-            buffer += szFlags;
-            buffer += '\0';
-            u64Timestamp = prop.mTimestamp;
-
-            /* Write out the data. */
-            if (RT_SUCCESS(rc))
+            HGCMSvcSetU64(&paParms[1], prop.mTimestamp);
+
+            size_t const cbFlags  = strlen(szFlags) + 1;
+            size_t const cbName   = prop.mName.length() + 1;
+            size_t const cbValue  = prop.mValue.length() + 1;
+            size_t const cbNeeded = cbName + cbValue + cbFlags;
+            HGCMSvcSetU32(&paParms[3], (uint32_t)cbNeeded);
+            if (cbNeeded <= cbBuf)
             {
-                HGCMSvcSetU64(&paParms[1], u64Timestamp);
-                HGCMSvcSetU32(&paParms[3], (uint32_t)buffer.size());
-                if (buffer.size() <= cbBuf)
-                    buffer.copy(pchBuf, cbBuf);
-                else
-                    rc = VERR_BUFFER_OVERFLOW;
+                memcpy(pchBuf, prop.mName.c_str(), cbName);
+                pchBuf += cbName;
+                memcpy(pchBuf, prop.mValue.c_str(), cbValue);
+                pchBuf += cbValue;
+                memcpy(pchBuf, szFlags, cbFlags);
             }
+            else
+                rc = VERR_BUFFER_OVERFLOW;
         }
     }
