Index: trunk/src/VBox/HostServices/DragAndDrop/service.cpp
===================================================================
--- trunk/src/VBox/HostServices/DragAndDrop/service.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/DragAndDrop/service.cpp	(revision 75737)
@@ -457,5 +457,5 @@
                         {
                             uint32_t fFlags = 0;
-                            int rc2 = paParms[2].getUInt32(&fFlags);
+                            int rc2 = HGCMSvcGetU32(&paParms[2], &fFlags);
                             if (   RT_SUCCESS(rc2)
                                 && fFlags) /* Blocking flag set? */
@@ -484,11 +484,11 @@
                     data.hdr.uMagic = CB_MAGIC_DND_CONNECT;
                     if (cParms >= 3)
-                        rc = paParms[0].getUInt32(&data.hdr.uContextID);
+                        rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
                     else /* Older protocols don't have a context ID. */
                         rc = VINF_SUCCESS;
                     if (RT_SUCCESS(rc))
-                        rc = paParms[idxProto].getUInt32(&data.uProtocol);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[idxProto + 1].getUInt32(&data.uFlags);
+                        rc = HGCMSvcGetU32(&paParms[idxProto], &data.uProtocol);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[idxProto + 1], &data.uFlags);
                     if (RT_SUCCESS(rc))
                         pClient->SetProtocolVer(data.uProtocol);
@@ -515,7 +515,7 @@
                         if (cParms == 2)
                         {
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.uAction); /* Get drop action. */
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.uAction); /* Get drop action. */
                         }
                         break;
@@ -526,5 +526,5 @@
                     {
                         if (cParms == 1)
-                            rc = paParms[0].getUInt32(&data.uAction); /* Get drop action. */
+                            rc = HGCMSvcGetU32(&paParms[0], &data.uAction); /* Get drop action. */
                         break;
                     }
@@ -548,9 +548,9 @@
                         if (cParms == 3)
                         {
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getPointer((void **)&data.pszFormat, &data.cbFormat);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.cbFormat);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[1], (void **)&data.pszFormat, &data.cbFormat);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.cbFormat);
                         }
                         break;
@@ -561,5 +561,5 @@
                     {
                         if (cParms == 1)
-                            rc = paParms[0].getPointer((void**)&data.pszFormat, &data.cbFormat);
+                            rc = HGCMSvcGetPv(&paParms[0], (void**)&data.pszFormat, &data.cbFormat);
                         break;
                     }
@@ -583,11 +583,11 @@
                         if (cParms == 4)
                         {
-                            rc = paParms[0].getUInt32(&data.uStatus);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.uStatus);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.uPercentage);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[3].getUInt32(&data.rc);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.uStatus);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.uStatus);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.uPercentage);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[3], &data.rc);
                         }
                         break;
@@ -599,9 +599,9 @@
                         if (cParms == 3)
                         {
-                            rc = paParms[0].getUInt32(&data.uStatus);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.uPercentage);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.rc);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.uStatus);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.uPercentage);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.rc);
                         }
                         break;
@@ -627,13 +627,13 @@
                         if (cParms == 5)
                         {
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.uDefAction);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.uAllActions);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[3].getPointer((void**)&data.pszFormat, &data.cbFormat);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[4].getUInt32(&data.cbFormat);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.uDefAction);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.uAllActions);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[3], (void**)&data.pszFormat, &data.cbFormat);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[4], &data.cbFormat);
                         }
                         break;
@@ -645,9 +645,9 @@
                         if (cParms == 3)
                         {
-                            rc = paParms[0].getUInt32(&data.uDefAction);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.uAllActions);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getPointer((void**)&data.pszFormat, &data.cbFormat);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.uDefAction);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.uAllActions);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[2], (void**)&data.pszFormat, &data.cbFormat);
                         }
                         break;
@@ -667,27 +667,27 @@
                     RT_ZERO(data);
                     data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DATA_HDR;
-                    rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[1].getUInt32(&data.data.uFlags);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[2].getUInt32(&data.data.uScreenId);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[3].getUInt64(&data.data.cbTotal);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[4].getUInt32(&data.data.cbMeta);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[5].getPointer(&data.data.pvMetaFmt, &data.data.cbMetaFmt);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[6].getUInt32(&data.data.cbMetaFmt);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[7].getUInt64(&data.data.cObjects);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[8].getUInt32(&data.data.enmCompression);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[9].getUInt32((uint32_t *)&data.data.enmChecksumType);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[10].getPointer(&data.data.pvChecksum, &data.data.cbChecksum);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[11].getUInt32(&data.data.cbChecksum);
+                    rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[1], &data.data.uFlags);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[2], &data.data.uScreenId);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU64(&paParms[3], &data.data.cbTotal);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[4], &data.data.cbMeta);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetPv(&paParms[5], &data.data.pvMetaFmt, &data.data.cbMetaFmt);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[6], &data.data.cbMetaFmt);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU64(&paParms[7], &data.data.cObjects);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[8], &data.data.enmCompression);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[9], (uint32_t *)&data.data.enmChecksumType);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetPv(&paParms[10], &data.data.pvChecksum, &data.data.cbChecksum);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[11], &data.data.cbChecksum);
 
                     LogFlowFunc(("fFlags=0x%x, cbTotalSize=%RU64, cObj=%RU64\n",
@@ -709,13 +709,13 @@
                             RT_ZERO(data);
                             data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DATA;
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getPointer((void**)&data.data.u.v3.pvData, &data.data.u.v3.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.data.u.v3.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[3].getPointer((void**)&data.data.u.v3.pvChecksum, &data.data.u.v3.cbChecksum);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[4].getUInt32(&data.data.u.v3.cbChecksum);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[1], (void**)&data.data.u.v3.pvData, &data.data.u.v3.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.data.u.v3.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[3], (void**)&data.data.u.v3.pvChecksum, &data.data.u.v3.cbChecksum);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[4], &data.data.u.v3.cbChecksum);
                             DO_HOST_CALLBACK();
                         }
@@ -731,7 +731,7 @@
                             RT_ZERO(data);
                             data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DATA;
-                            rc = paParms[0].getPointer((void**)&data.data.u.v1.pvData, &data.data.u.v1.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.data.u.v1.cbTotalSize);
+                            rc = HGCMSvcGetPv(&paParms[0], (void**)&data.data.u.v1.pvData, &data.data.u.v1.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.data.u.v1.cbTotalSize);
                             DO_HOST_CALLBACK();
                         }
@@ -755,11 +755,11 @@
                         if (cParms == 4)
                         {
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getPointer((void**)&data.pszPath, &data.cbPath);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.cbPath);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[3].getUInt32(&data.fMode);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[1], (void**)&data.pszPath, &data.cbPath);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.cbPath);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[3], &data.fMode);
                         }
                         break;
@@ -771,9 +771,9 @@
                         if (cParms == 3)
                         {
-                            rc = paParms[0].getPointer((void**)&data.pszPath, &data.cbPath);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.cbPath);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.fMode);
+                            rc = HGCMSvcGetPv(&paParms[0], (void**)&data.pszPath, &data.cbPath);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.cbPath);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.fMode);
                         }
                         break;
@@ -794,15 +794,15 @@
                     data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_HDR;
 
-                    rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[1].getPointer((void**)&data.pszFilePath, &data.cbFilePath);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[2].getUInt32(&data.cbFilePath);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[3].getUInt32(&data.fFlags);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[4].getUInt32(&data.fMode);
-                    if (RT_SUCCESS(rc))
-                        rc = paParms[5].getUInt64(&data.cbSize);
+                    rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetPv(&paParms[1], (void**)&data.pszFilePath, &data.cbFilePath);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[2], &data.cbFilePath);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[3], &data.fFlags);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU32(&paParms[4], &data.fMode);
+                    if (RT_SUCCESS(rc))
+                        rc = HGCMSvcGetU64(&paParms[5], &data.cbSize);
 
                     LogFlowFunc(("pszPath=%s, cbPath=%RU32, fMode=0x%x, cbSize=%RU64\n",
@@ -827,13 +827,13 @@
                             data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_DATA;
 
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getPointer((void**)&data.pvData, &data.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[3].getPointer((void**)&data.u.v3.pvChecksum, &data.u.v3.cbChecksum);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[4].getUInt32(&data.u.v3.cbChecksum);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[1], (void**)&data.pvData, &data.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[3], (void**)&data.u.v3.pvChecksum, &data.u.v3.cbChecksum);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[4], &data.u.v3.cbChecksum);
 
                             LogFlowFunc(("pvData=0x%p, cbData=%RU32\n", data.pvData, data.cbData));
@@ -850,9 +850,9 @@
                             RT_ZERO(data);
                             data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_DATA;
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getPointer((void**)&data.pvData, &data.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getUInt32(&data.cbData);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[1], (void**)&data.pvData, &data.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[2], &data.cbData);
 
                             LogFlowFunc(("cbData=%RU32, pvData=0x%p\n", data.cbData, data.pvData));
@@ -870,13 +870,13 @@
                             data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_DATA;
                             uint32_t cTmp;
-                            rc = paParms[0].getPointer((void**)&data.u.v1.pszFilePath, &cTmp);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[1].getUInt32(&data.u.v1.cbFilePath);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[2].getPointer((void**)&data.pvData, &cTmp);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[3].getUInt32(&data.cbData);
-                            if (RT_SUCCESS(rc))
-                                rc = paParms[4].getUInt32(&data.u.v1.fMode);
+                            rc = HGCMSvcGetPv(&paParms[0], (void**)&data.u.v1.pszFilePath, &cTmp);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[1], &data.u.v1.cbFilePath);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetPv(&paParms[2], (void**)&data.pvData, &cTmp);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[3], &data.cbData);
+                            if (RT_SUCCESS(rc))
+                                rc = HGCMSvcGetU32(&paParms[4], &data.u.v1.fMode);
 
                             LogFlowFunc(("pszFilePath=%s, cbData=%RU32, pvData=0x%p, fMode=0x%x\n",
@@ -903,9 +903,9 @@
                         if (cParms == 2)
                         {
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
                             if (RT_SUCCESS(rc))
                             {
                                 uint32_t rcOp;
-                                rc = paParms[1].getUInt32(&rcOp);
+                                rc = HGCMSvcGetU32(&paParms[1], &rcOp);
                                 if (RT_SUCCESS(rc))
                                     data.rc = rcOp;
@@ -921,5 +921,5 @@
                         {
                             uint32_t rcOp;
-                            rc = paParms[0].getUInt32(&rcOp);
+                            rc = HGCMSvcGetU32(&paParms[0], &rcOp);
                             if (RT_SUCCESS(rc))
                                 data.rc = (int32_t)rcOp;
@@ -953,5 +953,5 @@
                         /* Protocol v3+ at least requires the context ID. */
                         if (cParms == 1)
-                            rc = paParms[0].getUInt32(&data.hdr.uContextID);
+                            rc = HGCMSvcGetU32(&paParms[0], &data.hdr.uContextID);
 
                         break;
Index: trunk/src/VBox/HostServices/GuestControl/service.cpp
===================================================================
--- trunk/src/VBox/HostServices/GuestControl/service.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/GuestControl/service.cpp	(revision 75737)
@@ -224,5 +224,5 @@
              * assign the context ID to the command.
              */
-            rc = mpParms[0].getUInt32(&mContextID);
+            rc = HGCMSvcGetU32(&mpParms[0], &mContextID);
 
             /* Set timestamp so that clients can distinguish between already
@@ -418,6 +418,6 @@
         if (pConnection->mNumParms >= 2)
         {
-            pConnection->mParms[0].setUInt32(mMsgType);   /* Message ID */
-            pConnection->mParms[1].setUInt32(mParmCount); /* Required parameters for message */
+            HGCMSvcSetU32(&pConnection->mParms[0], mMsgType);   /* Message ID */
+            HGCMSvcSetU32(&pConnection->mParms[1], mParmCount); /* Required parameters for message */
         }
         else
@@ -777,6 +777,6 @@
             && mPendingCon.mNumParms >= 2)
         {
-            mPendingCon.mParms[0].setUInt32(HOST_CANCEL_PENDING_WAITS); /* Message ID. */
-            mPendingCon.mParms[1].setUInt32(0);                         /* Required parameters for message. */
+            HGCMSvcSetU32(&mPendingCon.mParms[0], HOST_CANCEL_PENDING_WAITS); /* Message ID. */
+            HGCMSvcSetU32(&mPendingCon.mParms[1], 0);                         /* Required parameters for message. */
 
             AssertPtr(mSvcHelpers);
@@ -1109,5 +1109,5 @@
             uint32_t cParms = 0;
             VBOXHGCMSVCPARM arParms[2];
-            arParms[cParms++].setUInt32(pCurCmd->mContextID);
+            HGCMSvcSetU32(&arParms[cParms++], pCurCmd->mContextID);
 
             int rc2 = hostCallback(GUEST_DISCONNECTED, cParms, arParms);
@@ -1207,13 +1207,13 @@
 
     uint32_t uValue;
-    int rc = paParms[0].getUInt32(&uValue);
+    int rc = HGCMSvcGetU32(&paParms[0], &uValue);
     if (RT_SUCCESS(rc))
     {
         uint32_t uMaskAdd;
-        rc = paParms[1].getUInt32(&uMaskAdd);
+        rc = HGCMSvcGetU32(&paParms[1], &uMaskAdd);
         if (RT_SUCCESS(rc))
         {
             uint32_t uMaskRemove;
-            rc = paParms[2].getUInt32(&uMaskRemove);
+            rc = HGCMSvcGetU32(&paParms[2], &uMaskRemove);
             /** @todo paParm[3] (flags) not used yet. */
             if (RT_SUCCESS(rc))
@@ -1584,7 +1584,7 @@
 
     uint32_t uContextID, uFlags;
-    int rc = paParms[0].getUInt32(&uContextID);
+    int rc = HGCMSvcGetU32(&paParms[0], &uContextID);
     if (RT_SUCCESS(rc))
-        rc = paParms[1].getUInt32(&uFlags);
+        rc = HGCMSvcGetU32(&paParms[1], &uFlags);
 
     uint32_t uSessionID = VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(uContextID);
Index: trunk/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp
===================================================================
--- trunk/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp	(revision 75737)
@@ -152,5 +152,5 @@
 
     VBOXHGCMSVCPARM aParms[1];
-    aParms[0].setUInt32(1000 /* Context ID */);
+    HGCMSvcSetU32(&aParms[0], 1000 /* Context ID */);
 
     CMDHOST aCmdHostAll[] =
@@ -208,6 +208,6 @@
         /* No commands from host yet. */
         VBOXHGCMSVCPARM aParmsGuest[8];
-        aParmsGuest[0].setUInt32(0 /* Msg type */);
-        aParmsGuest[1].setUInt32(0 /* Parameters */);
+        HGCMSvcSetU32(&aParmsGuest[0], 0 /* Msg type */);
+        HGCMSvcSetU32(&aParmsGuest[1], 0 /* Parameters */);
         pTable->pfnCall(pTable->pvService, &callHandle, 1 /* Client ID */, NULL /* pvClient */,
                         GUEST_MSG_WAIT, 2, &aParmsGuest[0], 0);
@@ -216,7 +216,7 @@
         /* Host: Add a dummy command. */
         VBOXHGCMSVCPARM aParmsHost[8];
-        aParmsHost[0].setUInt32(1000 /* Context ID */);
-        aParmsHost[1].setString("foo.bar");
-        aParmsHost[2].setString("baz");
+        HGCMSvcSetU32(&aParmsHost[0], 1000 /* Context ID */);
+        HGCMSvcSetStr(&aParmsHost[1], "foo.bar");
+        HGCMSvcSetStr(&aParmsHost[2], "baz");
 
         rc = pTable->pfnHostCall(pTable->pvService, HOST_EXEC_CMD, 3, &aParmsHost[0]);
Index: trunk/src/VBox/HostServices/GuestProperties/service.cpp
===================================================================
--- trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75737)
@@ -528,8 +528,8 @@
      */
     if (   cParms != 4
-        || RT_FAILURE(paParms[0].getPointer((void **)&papszNames, &cbDummy))
-        || RT_FAILURE(paParms[1].getPointer((void **)&papszValues, &cbDummy))
-        || RT_FAILURE(paParms[2].getPointer((void **)&pau64Timestamps, &cbDummy))
-        || RT_FAILURE(paParms[3].getPointer((void **)&papszFlags, &cbDummy))
+        || RT_FAILURE(HGCMSvcGetPv(&paParms[0], (void **)&papszNames, &cbDummy))
+        || RT_FAILURE(HGCMSvcGetPv(&paParms[1], (void **)&papszValues, &cbDummy))
+        || RT_FAILURE(HGCMSvcGetPv(&paParms[2], (void **)&pau64Timestamps, &cbDummy))
+        || RT_FAILURE(HGCMSvcGetPv(&paParms[3], (void **)&papszFlags, &cbDummy))
         )
         rc = VERR_INVALID_PARAMETER;
@@ -624,6 +624,6 @@
     LogFlowThisFunc(("\n"));
     if (   cParms != 4  /* Hardcoded value as the next lines depend on it. */
-        || RT_FAILURE(paParms[0].getString(&pcszName, &cbName))  /* name */
-        || RT_FAILURE(paParms[1].getBuffer((void **)&pchBuf, &cbBuf))  /* buffer */
+        || RT_FAILURE(HGCMSvcGetCStr(&paParms[0], &pcszName, &cbName))  /* name */
+        || RT_FAILURE(HGCMSvcGetBuf(&paParms[1], (void **)&pchBuf, &cbBuf))  /* buffer */
        )
         rc = VERR_INVALID_PARAMETER;
@@ -652,5 +652,5 @@
             size_t const cbValue  = pProp->mValue.size() + 1;
             size_t const cbNeeded = cbValue + cbFlags;
-            paParms[3].setUInt32((uint32_t)cbNeeded);
+            HGCMSvcSetU32(&paParms[3], (uint32_t)cbNeeded);
             if (cbBuf >= cbNeeded)
             {
@@ -659,5 +659,5 @@
                 memcpy(pchBuf + cbValue, szFlags, cbFlags);
 
-                paParms[2].setUInt64(pProp->mTimestamp);
+                HGCMSvcSetU64(&paParms[2], pProp->mTimestamp);
 
                 /*
@@ -708,8 +708,8 @@
     if (   RT_SUCCESS(rc)
         && (   (cParms < 2) || (cParms > 3)  /* Hardcoded value as the next lines depend on it. */
-            || RT_FAILURE(paParms[0].getString(&pcszName, &cchName))  /* name */
-            || RT_FAILURE(paParms[1].getString(&pcszValue, &cchValue))  /* value */
+            || RT_FAILURE(HGCMSvcGetCStr(&paParms[0], &pcszName, &cchName))  /* name */
+            || RT_FAILURE(HGCMSvcGetCStr(&paParms[1], &pcszValue, &cchValue))  /* value */
             || (   (3 == cParms)
-                && RT_FAILURE(paParms[2].getString(&pcszFlags, &cchFlags)) /* flags */
+                && RT_FAILURE(HGCMSvcGetCStr(&paParms[2], &pcszFlags, &cchFlags)) /* flags */
                )
            )
@@ -825,5 +825,5 @@
      */
     if (   (cParms == 1)  /* Hardcoded value as the next lines depend on it. */
-        && RT_SUCCESS(paParms[0].getString(&pcszName, &cbName))  /* name */
+        && RT_SUCCESS(HGCMSvcGetCStr(&paParms[0], &pcszName, &cbName))  /* name */
        )
         rc = validateName(pcszName, cbName);
@@ -954,6 +954,6 @@
     LogFlowThisFunc(("\n"));
     if (   (cParms != 3)  /* Hardcoded value as the next lines depend on it. */
-        || RT_FAILURE(paParms[0].getString(&pchPatterns, &cbPatterns))  /* patterns */
-        || RT_FAILURE(paParms[1].getBuffer((void **)&pchBuf, &cbBuf))  /* return buffer */
+        || RT_FAILURE(HGCMSvcGetCStr(&paParms[0], &pchPatterns, &cbPatterns))  /* patterns */
+        || RT_FAILURE(HGCMSvcGetBuf(&paParms[1], (void **)&pchBuf, &cbBuf))  /* return buffer */
        )
         rc = VERR_INVALID_PARAMETER;
@@ -989,5 +989,5 @@
         if (RT_SUCCESS(rc))
         {
-            paParms[2].setUInt32((uint32_t)(EnumData.cbNeeded + 4));
+            HGCMSvcSetU32(&paParms[2], (uint32_t)(EnumData.cbNeeded + 4));
             if (EnumData.cbLeft >= 4)
             {
@@ -1048,5 +1048,5 @@
     uint32_t cbBuf;
 
-    int rc = paParms[2].getBuffer((void **)&pchBuf, &cbBuf);
+    int rc = HGCMSvcGetBuf(&paParms[2], (void **)&pchBuf, &cbBuf);
     if (RT_SUCCESS(rc))
     {
@@ -1066,6 +1066,6 @@
             if (RT_SUCCESS(rc))
             {
-                paParms[1].setUInt64(u64Timestamp);
-                paParms[3].setUInt32((uint32_t)buffer.size());
+                HGCMSvcSetU64(&paParms[1], u64Timestamp);
+                HGCMSvcSetU32(&paParms[3], (uint32_t)buffer.size());
                 if (buffer.size() <= cbBuf)
                     buffer.copy(pchBuf, cbBuf);
@@ -1105,7 +1105,7 @@
     LogFlowThisFunc(("\n"));
     if (   cParms != 4  /* Hardcoded value as the next lines depend on it. */
-        || RT_FAILURE(paParms[0].getString(&pszPatterns, &cchPatterns))  /* patterns */
-        || RT_FAILURE(paParms[1].getUInt64(&u64Timestamp))  /* timestamp */
-        || RT_FAILURE(paParms[2].getBuffer((void **)&pchBuf, &cbBuf))  /* return buffer */
+        || RT_FAILURE(HGCMSvcGetStr(&paParms[0], &pszPatterns, &cchPatterns))  /* patterns */
+        || RT_FAILURE(HGCMSvcGetU64(&paParms[1], &u64Timestamp))  /* timestamp */
+        || RT_FAILURE(HGCMSvcGetBuf(&paParms[2], (void **)&pchBuf, &cbBuf))  /* return buffer */
        )
         rc = VERR_INVALID_PARAMETER;
@@ -1135,5 +1135,5 @@
                     const char *pszPatternsExisting;
                     uint32_t cchPatternsExisting;
-                    int rc3 = it->mParms[0].getString(&pszPatternsExisting, &cchPatternsExisting);
+                    int rc3 = HGCMSvcGetCStr(&it->mParms[0], &pszPatternsExisting, &cchPatternsExisting);
 
                     if (   RT_SUCCESS(rc3)
@@ -1213,5 +1213,5 @@
             const char *pszPatterns;
             uint32_t cchPatterns;
-            it->mParms[0].getString(&pszPatterns, &cchPatterns);
+            HGCMSvcGetCStr(&it->mParms[0], &pszPatterns, &cchPatterns);
             if (prop.Matches(pszPatterns))
             {
@@ -1529,5 +1529,5 @@
                 {
                     uint32_t fFlags;
-                    rc = paParms[0].getUInt32(&fFlags);
+                    rc = HGCMSvcGetU32(&paParms[0], &fFlags);
                     if (RT_SUCCESS(rc))
                         mfGlobalFlags = fFlags;
Index: trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
===================================================================
--- trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp	(revision 75737)
@@ -225,8 +225,8 @@
 
     VBOXHGCMSVCPARM aParms[4];
-    aParms[0].setPointer((void *)g_apcszNameBlock, 0);
-    aParms[1].setPointer((void *)g_apcszValueBlock, 0);
-    aParms[2].setPointer((void *)g_au64TimestampBlock, 0);
-    aParms[3].setPointer((void *)g_apcszFlagsBlock, 0);
+    HGCMSvcSetPv(&aParms[0], (void *)g_apcszNameBlock, 0);
+    HGCMSvcSetPv(&aParms[1], (void *)g_apcszValueBlock, 0);
+    HGCMSvcSetPv(&aParms[2], (void *)g_au64TimestampBlock, 0);
+    HGCMSvcSetPv(&aParms[3], (void *)g_apcszFlagsBlock, 0);
     RTTESTI_CHECK_RC(ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_HOST_SET_PROPS, 4, &aParms[0]), VINF_SUCCESS);
 }
@@ -337,6 +337,6 @@
 
         /* Check that we get buffer overflow with a too small buffer. */
-        aParms[0].setPointer((void *)g_aEnumStrings[i].pszPatterns, g_aEnumStrings[i].cchPatterns);
-        aParms[1].setPointer((void *)abBuffer, g_aEnumStrings[i].cbBuffer - 1);
+        HGCMSvcSetPv(&aParms[0], (void *)g_aEnumStrings[i].pszPatterns, g_aEnumStrings[i].cchPatterns);
+        HGCMSvcSetPv(&aParms[1], (void *)abBuffer, g_aEnumStrings[i].cbBuffer - 1);
         memset(abBuffer, 0x55, sizeof(abBuffer));
         int rc2 = ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_HOST_ENUM_PROPS, 3, aParms);
@@ -344,5 +344,5 @@
         {
             uint32_t cbNeeded;
-            RTTESTI_CHECK_RC(rc2 = aParms[2].getUInt32(&cbNeeded), VINF_SUCCESS);
+            RTTESTI_CHECK_RC(rc2 = HGCMSvcGetU32(&aParms[2], &cbNeeded), VINF_SUCCESS);
             if (RT_SUCCESS(rc2))
                 RTTESTI_CHECK_MSG(cbNeeded == g_aEnumStrings[i].cbBuffer,
@@ -353,6 +353,6 @@
 
         /* Make a successfull call. */
-        aParms[0].setPointer((void *)g_aEnumStrings[i].pszPatterns, g_aEnumStrings[i].cchPatterns);
-        aParms[1].setPointer((void *)abBuffer, g_aEnumStrings[i].cbBuffer);
+        HGCMSvcSetPv(&aParms[0], (void *)g_aEnumStrings[i].pszPatterns, g_aEnumStrings[i].cchPatterns);
+        HGCMSvcSetPv(&aParms[1], (void *)abBuffer, g_aEnumStrings[i].cbBuffer);
         memset(abBuffer, 0x55, sizeof(abBuffer));
         rc2 = ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_HOST_ENUM_PROPS, 3, aParms);
@@ -416,7 +416,7 @@
     RTStrPrintf(szValue, sizeof(szValue), "%s", pcszValue);
     RTStrPrintf(szFlags, sizeof(szFlags), "%s", pcszFlags);
-    aParms[0].setString(szName);
-    aParms[1].setString(szValue);
-    aParms[2].setString(szFlags);
+    HGCMSvcSetStr(&aParms[0], szName);
+    HGCMSvcSetStr(&aParms[1], szValue);
+    HGCMSvcSetStr(&aParms[2], szFlags);
     if (isHost)
         callHandle.rc = pTable->pfnHostCall(pTable->pvService, command,
@@ -505,5 +505,5 @@
         command = GUEST_PROP_FN_HOST_DEL_PROP;
     VBOXHGCMSVCPARM aParms[1];
-    aParms[0].setString(pcszName);
+    HGCMSvcSetStr(&aParms[0], pcszName);
     if (isHost)
         callHandle.rc = pTable->pfnHostCall(pTable->pvService, command, 1, aParms);
@@ -606,7 +606,7 @@
         RTTESTI_CHECK_RETV(s_aGetProperties[i].cchValue < sizeof(szBuffer));
 
-        aParms[0].setString(s_aGetProperties[i].pcszName);
+        HGCMSvcSetStr(&aParms[0], s_aGetProperties[i].pcszName);
         memset(szBuffer, 0x55, sizeof(szBuffer));
-        aParms[1].setPointer(szBuffer, sizeof(szBuffer));
+        HGCMSvcSetPv(&aParms[1], szBuffer, sizeof(szBuffer));
         int rc2 = pTable->pfnHostCall(pTable->pvService, GUEST_PROP_FN_HOST_GET_PROP, 4, aParms);
 
@@ -630,5 +630,5 @@
 
             uint32_t u32ValueLen = UINT32_MAX;
-            RTTESTI_CHECK_RC(rc2 = aParms[3].getUInt32(&u32ValueLen), VINF_SUCCESS);
+            RTTESTI_CHECK_RC(rc2 = HGCMSvcGetU32(&aParms[3], &u32ValueLen), VINF_SUCCESS);
             if (RT_SUCCESS(rc2))
             {
@@ -643,5 +643,5 @@
             {
                 uint64_t u64Timestamp = UINT64_MAX;
-                RTTESTI_CHECK_RC(rc2 = aParms[2].getUInt64(&u64Timestamp), VINF_SUCCESS);
+                RTTESTI_CHECK_RC(rc2 = HGCMSvcGetU64(&aParms[2], &u64Timestamp), VINF_SUCCESS);
                 if (u64Timestamp != s_aGetProperties[i].u64Timestamp)
                     RTTestIFailed("Bad timestamp %llu for property '%s', expected %llu.",
@@ -700,11 +700,11 @@
         memset(pvBuf, 0x55, cbBuf);
 
-        aParms[0].setPointer((void *)s_szPattern, sizeof(s_szPattern));
-        aParms[1].setUInt64(1);
-        aParms[2].setPointer(pvBuf, cbBuf);
+        HGCMSvcSetPv(&aParms[0], (void *)s_szPattern, sizeof(s_szPattern));
+        HGCMSvcSetU64(&aParms[1], 1);
+        HGCMSvcSetPv(&aParms[2], pvBuf, cbBuf);
         pTable->pfnCall(pTable->pvService, &callHandle, 0, NULL, GUEST_PROP_FN_GET_NOTIFICATION, 4, aParms, 0);
 
         if (   callHandle.rc != VERR_BUFFER_OVERFLOW
-            || RT_FAILURE(aParms[3].getUInt32(&cbRetNeeded))
+            || RT_FAILURE(HGCMSvcGetU32(&aParms[3], &cbRetNeeded))
             || cbRetNeeded != g_aGetNotifications[0].cbBuffer
            )
@@ -726,12 +726,12 @@
         memset(pvBuf, 0x55, cbBuf);
 
-        aParms[0].setPointer((void *)s_szPattern, sizeof(s_szPattern));
-        aParms[1].setUInt64(u64Timestamp);
-        aParms[2].setPointer(pvBuf, cbBuf);
+        HGCMSvcSetPv(&aParms[0], (void *)s_szPattern, sizeof(s_szPattern));
+        HGCMSvcSetU64(&aParms[1], u64Timestamp);
+        HGCMSvcSetPv(&aParms[2], pvBuf, cbBuf);
         pTable->pfnCall(pTable->pvService, &callHandle, 0, NULL, GUEST_PROP_FN_GET_NOTIFICATION, 4, aParms, 0);
         if (   RT_FAILURE(callHandle.rc)
             || (i == 0 && callHandle.rc != VWRN_NOT_FOUND)
-            || RT_FAILURE(aParms[1].getUInt64(&u64Timestamp))
-            || RT_FAILURE(aParms[3].getUInt32(&cbRetNeeded))
+            || RT_FAILURE(HGCMSvcGetU64(&aParms[1], &u64Timestamp))
+            || RT_FAILURE(HGCMSvcGetU32(&aParms[3], &cbRetNeeded))
             || cbRetNeeded != g_aGetNotifications[i].cbBuffer
             || memcmp(pvBuf, g_aGetNotifications[i].pchBuffer, cbRetNeeded) != 0
@@ -764,7 +764,7 @@
     static char s_szPattern[] = "";
 
-    g_AsyncNotification.aParms[0].setPointer((void *)s_szPattern, sizeof(s_szPattern));
-    g_AsyncNotification.aParms[1].setUInt64(0);
-    g_AsyncNotification.aParms[2].setPointer((void *)g_AsyncNotification.abBuffer,
+    HGCMSvcSetPv(&g_AsyncNotification.aParms[0], (void *)s_szPattern, sizeof(s_szPattern));
+    HGCMSvcSetU64(&g_AsyncNotification.aParms[1], 0);
+    HGCMSvcSetPv(&g_AsyncNotification.aParms[2], (void *)g_AsyncNotification.abBuffer,
                                              sizeof(g_AsyncNotification.abBuffer));
     g_AsyncNotification.callHandle.rc = VINF_HGCM_ASYNC_EXECUTE;
@@ -786,6 +786,6 @@
     uint32_t u32Size;
     if (   g_AsyncNotification.callHandle.rc != VINF_SUCCESS
-        || RT_FAILURE(g_AsyncNotification.aParms[1].getUInt64(&u64Timestamp))
-        || RT_FAILURE(g_AsyncNotification.aParms[3].getUInt32(&u32Size))
+        || RT_FAILURE(HGCMSvcGetU64(&g_AsyncNotification.aParms[1], &u64Timestamp))
+        || RT_FAILURE(HGCMSvcGetU32(&g_AsyncNotification.aParms[3], &u32Size))
         || u32Size != g_aGetNotifications[0].cbBuffer
         || memcmp(g_AsyncNotification.abBuffer, g_aGetNotifications[0].pchBuffer, u32Size) != 0
@@ -834,5 +834,5 @@
 {
     VBOXHGCMSVCPARM paParm;
-    paParm.setUInt32(fFlags);
+    HGCMSvcSetU32(&paParm, fFlags);
     int rc = pTable->pfnHostCall(pTable->pvService, GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS, 1, &paParm);
     if (RT_FAILURE(rc))
@@ -1018,6 +1018,6 @@
 
             VBOXHGCMSVCPARM aParms[4];
-            aParms[0].setString(s_szProp);
-            aParms[1].setPointer(pvBuf, cbBuf);
+            HGCMSvcSetStr(&aParms[0], s_szProp);
+            HGCMSvcSetPv(&aParms[1], pvBuf, cbBuf);
             svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_HOST_GET_PROP, RT_ELEMENTS(aParms), aParms);
 
@@ -1054,6 +1054,6 @@
 
             VBOXHGCMSVCPARM aParms[3];
-            aParms[0].setString("*");
-            aParms[1].setPointer(pvBuf, cbBuf);
+            HGCMSvcSetStr(&aParms[0], "*");
+            HGCMSvcSetPv(&aParms[1], pvBuf, cbBuf);
             svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_HOST_ENUM_PROPS, RT_ELEMENTS(aParms), aParms);
 
@@ -1123,6 +1123,6 @@
             VBOXHGCMSVCPARM aParms[4];
             char            szBuffer[256];
-            aParms[0].setPointer(szProp, (uint32_t)cchProp + 1);
-            aParms[1].setPointer(szBuffer, sizeof(szBuffer));
+            HGCMSvcSetPv(&aParms[0], szProp, (uint32_t)cchProp + 1);
+            HGCMSvcSetPv(&aParms[1], szBuffer, sizeof(szBuffer));
             RTTESTI_CHECK_RC_BREAK(svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_HOST_GET_PROP, 4, aParms), VINF_SUCCESS);
         }
Index: trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp	(revision 75737)
@@ -62,5 +62,5 @@
     RTTESTI_CHECK_MSG_RETV(RT_SUCCESS(rc), ("rc=%Rrc\n", rc));
     /* Reset global variable which doesn't reset itself. */
-    parms[0].setUInt32(VBOX_SHARED_CLIPBOARD_MODE_OFF);
+    HGCMSvcSetU32(&parms[0], VBOX_SHARED_CLIPBOARD_MODE_OFF);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE,
                            1, parms);
@@ -75,9 +75,9 @@
                            2, parms);
     RTTESTI_CHECK_RC(rc, VERR_INVALID_PARAMETER);
-    parms[0].setUInt64(99);
-    rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE,
-                           1, parms);
-    RTTESTI_CHECK_RC(rc, VERR_INVALID_PARAMETER);
-    parms[0].setUInt32(VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST);
+    HGCMSvcSetU64(&parms[0], 99);
+    rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE,
+                           1, parms);
+    RTTESTI_CHECK_RC(rc, VERR_INVALID_PARAMETER);
+    HGCMSvcSetU32(&parms[0], VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE,
                            1, parms);
@@ -86,5 +86,5 @@
     RTTESTI_CHECK_MSG(u32Mode == VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST,
                       ("u32Mode=%u\n", (unsigned) u32Mode));
-    parms[0].setUInt32(99);
+    HGCMSvcSetU32(&parms[0], 99);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE,
                            1, parms);
@@ -107,5 +107,5 @@
     RTTESTI_CHECK_MSG_RETV(RT_SUCCESS(rc), ("rc=%Rrc\n", rc));
     /* Unless we are bidirectional the host message requests will be dropped. */
-    parms[0].setUInt32(VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL);
+    HGCMSvcSetU32(&parms[0], VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE,
                            1, parms);
@@ -114,6 +114,6 @@
     RTTestISub("Testing FN_GET_HOST_MSG, one format, waiting guest call.");
     RT_ZERO(g_Client);
-    parms[0].setUInt32(0);
-    parms[1].setUInt32(0);
+    HGCMSvcSetU32(&parms[0], 0);
+    HGCMSvcSetU32(&parms[1], 0);
     call.rc = VERR_TRY_AGAIN;
     table.pfnCall(NULL, &call, 1 /* clientId */, &g_Client, VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG,
@@ -134,6 +134,6 @@
     vboxSvcClipboardReportMsg (&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,
                                VBOX_SHARED_CLIPBOARD_FMT_HTML);
-    parms[0].setUInt32(0);
-    parms[1].setUInt32(0);
+    HGCMSvcSetU32(&parms[0], 0);
+    HGCMSvcSetU32(&parms[1], 0);
     call.rc = VERR_TRY_AGAIN;
     table.pfnCall(NULL, &call, 1 /* clientId */, &g_Client, VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG,
@@ -149,6 +149,6 @@
     RTTestISub("Testing FN_GET_HOST_MSG, two formats, waiting guest call.");
     RT_ZERO(g_Client);
-    parms[0].setUInt32(0);
-    parms[1].setUInt32(0);
+    HGCMSvcSetU32(&parms[0], 0);
+    HGCMSvcSetU32(&parms[1], 0);
     call.rc = VERR_TRY_AGAIN;
     table.pfnCall(NULL, &call, 1 /* clientId */, &g_Client, VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG,
@@ -175,6 +175,6 @@
     vboxSvcClipboardReportMsg (&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,
                                VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT | VBOX_SHARED_CLIPBOARD_FMT_HTML);
-    parms[0].setUInt32(0);
-    parms[1].setUInt32(0);
+    HGCMSvcSetU32(&parms[0], 0);
+    HGCMSvcSetU32(&parms[1], 0);
     call.rc = VERR_TRY_AGAIN;
     table.pfnCall(NULL, &call, 1 /* clientId */, &g_Client, VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG,
@@ -207,5 +207,5 @@
     RTTESTI_CHECK_MSG_RETV(RT_SUCCESS(rc), ("rc=%Rrc\n", rc));
     /* Reset global variable which doesn't reset itself. */
-    parms[0].setUInt32(false);
+    HGCMSvcSetU32(&parms[0], false);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS,
                            1, parms);
@@ -219,9 +219,9 @@
                            2, parms);
     RTTESTI_CHECK_RC(rc, VERR_INVALID_PARAMETER);
-    parms[0].setUInt64(99);
-    rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS,
-                           1, parms);
-    RTTESTI_CHECK_RC(rc, VERR_INVALID_PARAMETER);
-    parms[0].setUInt32(true);
+    HGCMSvcSetU64(&parms[0], 99);
+    rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS,
+                           1, parms);
+    RTTESTI_CHECK_RC(rc, VERR_INVALID_PARAMETER);
+    HGCMSvcSetU32(&parms[0], true);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS,
                            1, parms);
@@ -229,5 +229,5 @@
     fHeadless = vboxSvcClipboardGetHeadless();
     RTTESTI_CHECK_MSG(fHeadless == true, ("fHeadless=%RTbool\n", fHeadless));
-    parms[0].setUInt32(99);
+    HGCMSvcSetU32(&parms[0], 99);
     rc = table.pfnHostCall(NULL, VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS,
                            1, parms);
Index: trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp	(revision 75737)
@@ -659,18 +659,18 @@
     fillTestShflString(&Mapping, pcszMapping);
     fillTestShflString(&AutoMountPoint, "");
-    aParms[0].setPointer(&FolderName,   RT_UOFFSETOF(SHFLSTRING, String)
+    HGCMSvcSetPv(&aParms[0], &FolderName,   RT_UOFFSETOF(SHFLSTRING, String)
                                       + FolderName.string.u16Size);
-    aParms[1].setPointer(&Mapping,   RT_UOFFSETOF(SHFLSTRING, String)
+    HGCMSvcSetPv(&aParms[1], &Mapping,   RT_UOFFSETOF(SHFLSTRING, String)
                                    + Mapping.string.u16Size);
-    aParms[2].setUInt32(1);
-    aParms[3].setPointer(&AutoMountPoint, SHFLSTRING_HEADER_SIZE + AutoMountPoint.string.u16Size);
+    HGCMSvcSetU32(&aParms[2], 1);
+    HGCMSvcSetPv(&aParms[3], &AutoMountPoint, SHFLSTRING_HEADER_SIZE + AutoMountPoint.string.u16Size);
     rc = psvcTable->pfnHostCall(psvcTable->pvService, SHFL_FN_ADD_MAPPING,
                                 SHFL_CPARMS_ADD_MAPPING, aParms);
     AssertReleaseRC(rc);
-    aParms[0].setPointer(&Mapping,   RT_UOFFSETOF(SHFLSTRING, String)
+    HGCMSvcSetPv(&aParms[0], &Mapping,   RT_UOFFSETOF(SHFLSTRING, String)
                                    + Mapping.string.u16Size);
-    aParms[1].setUInt32(0);  /* root */
-    aParms[2].setUInt32('/');  /* delimiter */
-    aParms[3].setUInt32(fCaseSensitive);
+    HGCMSvcSetU32(&aParms[1], 0);  /* root */
+    HGCMSvcSetU32(&aParms[2], '/');  /* delimiter */
+    HGCMSvcSetU32(&aParms[3], fCaseSensitive);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_MAP_FOLDER,
@@ -692,5 +692,5 @@
     int rc;
 
-    aParms[0].setUInt32(root);
+    HGCMSvcSetU32(&aParms[0], root);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_UNMAP_FOLDER,
@@ -698,5 +698,5 @@
     AssertReleaseRC(callHandle.rc);
     fillTestShflString(&FolderName, pcszFolderName);
-    aParms[0].setPointer(&FolderName,   RT_UOFFSETOF(SHFLSTRING, String)
+    HGCMSvcSetPv(&aParms[0], &FolderName,   RT_UOFFSETOF(SHFLSTRING, String)
                                       + FolderName.string.u16Size);
     rc = psvcTable->pfnHostCall(psvcTable->pvService, SHFL_FN_REMOVE_MAPPING,
@@ -717,8 +717,8 @@
     RT_ZERO(CreateParms);
     CreateParms.CreateFlags = fCreateFlags;
-    aParms[0].setUInt32(Root);
-    aParms[1].setPointer(&Path,   RT_UOFFSETOF(SHFLSTRING, String)
+    HGCMSvcSetU32(&aParms[0], Root);
+    HGCMSvcSetPv(&aParms[1], &Path,   RT_UOFFSETOF(SHFLSTRING, String)
                                 + Path.string.u16Size);
-    aParms[2].setPointer(&CreateParms, sizeof(CreateParms));
+    HGCMSvcSetPv(&aParms[2], &CreateParms, sizeof(CreateParms));
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_CREATE,
@@ -740,9 +740,9 @@
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
-    aParms[0].setUInt32(Root);
-    aParms[1].setUInt64((uint64_t) hFile);
-    aParms[2].setUInt64(offSeek);
-    aParms[3].setUInt32(cbRead);
-    aParms[4].setPointer(pvBuf, cbBuf);
+    HGCMSvcSetU32(&aParms[0], Root);
+    HGCMSvcSetU64(&aParms[1], (uint64_t) hFile);
+    HGCMSvcSetU64(&aParms[2], offSeek);
+    HGCMSvcSetU32(&aParms[3], cbRead);
+    HGCMSvcSetPv(&aParms[4], pvBuf, cbBuf);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_READ,
@@ -760,9 +760,9 @@
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
-    aParms[0].setUInt32(Root);
-    aParms[1].setUInt64((uint64_t) hFile);
-    aParms[2].setUInt64(offSeek);
-    aParms[3].setUInt32(cbWrite);
-    aParms[4].setPointer((void *)pvBuf, cbBuf);
+    HGCMSvcSetU32(&aParms[0], Root);
+    HGCMSvcSetU64(&aParms[1], (uint64_t) hFile);
+    HGCMSvcSetU64(&aParms[2], offSeek);
+    HGCMSvcSetU32(&aParms[3], cbWrite);
+    HGCMSvcSetPv(&aParms[4], (void *)pvBuf, cbBuf);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_WRITE,
@@ -779,6 +779,6 @@
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
-    aParms[0].setUInt32(root);
-    aParms[1].setUInt64(handle);
+    HGCMSvcSetU32(&aParms[0], root);
+    HGCMSvcSetU64(&aParms[1], handle);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_FLUSH,
@@ -796,19 +796,19 @@
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
-    aParms[0].setUInt32(root);
-    aParms[1].setUInt64(handle);
-    aParms[2].setUInt32(fFlags);
-    aParms[3].setUInt32(cbBuf);
+    HGCMSvcSetU32(&aParms[0], root);
+    HGCMSvcSetU64(&aParms[1], handle);
+    HGCMSvcSetU32(&aParms[2], fFlags);
+    HGCMSvcSetU32(&aParms[3], cbBuf);
     if (pcszPath)
     {
         fillTestShflString(&Path, pcszPath);
-        aParms[4].setPointer(&Path,   RT_UOFFSETOF(SHFLSTRING, String)
+        HGCMSvcSetPv(&aParms[4], &Path,   RT_UOFFSETOF(SHFLSTRING, String)
                                     + Path.string.u16Size);
     }
     else
-        aParms[4].setPointer(NULL, 0);
-    aParms[5].setPointer(pvBuf, cbBuf);
-    aParms[6].setUInt32(resumePoint);
-    aParms[7].setUInt32(0);
+        HGCMSvcSetPv(&aParms[4], NULL, 0);
+    HGCMSvcSetPv(&aParms[5], pvBuf, cbBuf);
+    HGCMSvcSetU32(&aParms[6], resumePoint);
+    HGCMSvcSetU32(&aParms[7], 0);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_LIST,
@@ -826,9 +826,9 @@
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
-    aParms[0].setUInt32(root);
-    aParms[1].setUInt64(handle);
-    aParms[2].setUInt32(fFlags);
-    aParms[3].setUInt32(cb);
-    aParms[4].setPointer(pInfo, cb);
+    HGCMSvcSetU32(&aParms[0], root);
+    HGCMSvcSetU64(&aParms[1], handle);
+    HGCMSvcSetU32(&aParms[2], fFlags);
+    HGCMSvcSetU32(&aParms[3], cb);
+    HGCMSvcSetPv(&aParms[4], pInfo, cb);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_INFORMATION,
@@ -844,9 +844,9 @@
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
-    aParms[0].setUInt32(root);
-    aParms[1].setUInt64(handle);
-    aParms[2].setUInt64(offLock);
-    aParms[3].setUInt64(cbLock);
-    aParms[4].setUInt32(fFlags);
+    HGCMSvcSetU32(&aParms[0], root);
+    HGCMSvcSetU64(&aParms[1], handle);
+    HGCMSvcSetU64(&aParms[2], offLock);
+    HGCMSvcSetU64(&aParms[3], cbLock);
+    HGCMSvcSetU32(&aParms[4], fFlags);
     psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0,
                        psvcTable->pvService, SHFL_FN_LOCK,
Index: trunk/src/VBox/HostServices/common/client.cpp
===================================================================
--- trunk/src/VBox/HostServices/common/client.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/common/client.cpp	(revision 75737)
@@ -222,6 +222,6 @@
         AssertPtrReturn(m_Deferred.paParms, VERR_BUFFER_OVERFLOW);
 
-        m_Deferred.paParms[0].setUInt32(uMsg);
-        m_Deferred.paParms[1].setUInt32(cParms);
+        HGCMSvcSetU32(&m_Deferred.paParms[0], uMsg);
+        HGCMSvcSetU32(&m_Deferred.paParms[1], cParms);
 
         return VINF_SUCCESS;
Index: trunk/src/VBox/HostServices/testcase/tstHGCMSvc.cpp
===================================================================
--- trunk/src/VBox/HostServices/testcase/tstHGCMSvc.cpp	(revision 75709)
+++ trunk/src/VBox/HostServices/testcase/tstHGCMSvc.cpp	(revision 75737)
@@ -24,4 +24,65 @@
 #include <iprt/test.h>
 
+/** Test the getString member function.  Indirectly tests the getPointer
+ * and getBuffer APIs.
+ * @param  hTest  an running IPRT test
+ * @param  type  the type that the parameter should be set to before
+ *                calling getString
+ * @param  pcch   the value that the parameter should be set to before
+ *                calling getString, and also the address (!) which we
+ *                expect getString to return.  Stricter than needed of
+ *                course, but I was feeling lazy.
+ * @param  cb     the size that the parameter should be set to before
+ *                calling getString, and also the size which we expect
+ *                getString to return.
+ * @param  rcExp  the expected return value of the call to getString.
+ */
+void doTestGetString(VBOXHGCMSVCPARM *pParm, RTTEST hTest, uint32_t type,
+                     const char *pcch, uint32_t cb, int rcExp)
+{
+    /* An RTTest API like this, which would print out an additional line
+     * of context if a test failed, would be nice.  This is because the
+     * line number alone doesn't help much here, given that this is a
+     * subroutine called many times. */
+    /*
+    RTTestContextF(hTest,
+                   ("doTestGetString, type=%u, pcch=%p, acp=%u, rcExp=%Rrc",
+                    type, pcch, acp, rcExp));
+     */
+    HGCMSvcSetPv(pParm, (void *)pcch, cb);
+    pParm->type = type;  /* in case we don't want VBOX_HGCM_SVC_PARM_PTR */
+    const char *pcch2 = NULL;
+    uint32_t cb2 = 0;
+    int rc = HGCMSvcGetCStr(pParm, &pcch2, &cb2);
+    RTTEST_CHECK_RC(hTest, rc, rcExp);
+    if (RT_SUCCESS(rcExp))
+    {
+        RTTEST_CHECK_MSG_RETV(hTest, (pcch2 == pcch),
+                              (hTest, "expected %p, got %p", pcch, pcch2));
+        RTTEST_CHECK_MSG_RETV(hTest, (cb2 == cb),
+                              (hTest, "expected %u, got %u", cb, cb2));
+    }
+}
+
+/** Run some unit tests on the getString method and indirectly test
+ * getPointer and getBuffer as well. */
+void testGetString(VBOXHGCMSVCPARM *pParm, RTTEST hTest)
+{
+    RTTestSub(hTest, "HGCM string parameter handling");
+    doTestGetString(pParm, hTest, VBOX_HGCM_SVC_PARM_32BIT, "test", 3,
+                    VERR_INVALID_PARAMETER);
+    doTestGetString(pParm, hTest, VBOX_HGCM_SVC_PARM_PTR, "test", 5,
+                    VINF_SUCCESS);
+    doTestGetString(pParm, hTest, VBOX_HGCM_SVC_PARM_PTR, "test", 3,
+                    VERR_BUFFER_OVERFLOW);
+    doTestGetString(pParm, hTest, VBOX_HGCM_SVC_PARM_PTR, "test\xf0", 6,
+                    VERR_INVALID_UTF8_ENCODING);
+    doTestGetString(pParm, hTest, VBOX_HGCM_SVC_PARM_PTR, "test", 0,
+                    VERR_INVALID_PARAMETER);
+    doTestGetString(pParm, hTest, VBOX_HGCM_SVC_PARM_PTR, (const char *)0x1, 5,
+                    VERR_INVALID_PARAMETER);
+    RTTestSubDone(hTest);
+}
+
 int main()
 {
@@ -39,5 +100,5 @@
      */
     VBOXHGCMSVCPARM parm;
-    parm.testGetString(hTest);
+    testGetString(&parm, hTest);
 
     /*
