Index: trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp	(revision 76891)
+++ trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp	(revision 76958)
@@ -94,7 +94,7 @@
     AssertPtrReturn(pcParameters, VERR_INVALID_POINTER);
 
-    HGCMMsgCmdWaitFor Msg;
+    HGCMMsgWaitFor Msg;
     VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient,
-                       GUEST_MSG_WAIT,      /* Tell the host we want our next command. */
+                       GUEST_MSG_WAIT,      /* Tell the host we want our next message. */
                        2);                  /* Just peek for the next message! */
     VbglHGCMParmUInt32Set(&Msg.msg, 0);
@@ -103,5 +103,5 @@
     /*
      * We should always get a VERR_TOO_MUCH_DATA response here, see
-     * guestControl::HostCommand::Peek() and its caller ClientState::SendReply().
+     * guestControl::HostMessage::Peek() and its caller ClientState::SendReply().
      * We accept success too here, in case someone decide to make the protocol
      * slightly more sane.
@@ -166,5 +166,5 @@
     /*
      * Seems we get VINF_SUCCESS back from the host if we try unsupported
-     * guest control functions, so we need to supply some random message
+     * guest control messages, so we need to supply some random message
      * parameters and check that they change.
      */
@@ -301,5 +301,5 @@
     {
         VBGLIOCHGCMCALL Hdr;
-        VBGL_HGCM_HDR_INIT(&Hdr, idClient, GUEST_MAKE_ME_MASTER, 0);
+        VBGL_HGCM_HDR_INIT(&Hdr, idClient, GUEST_MSG_MAKE_ME_MASTER, 0);
         rc = VbglR3HGCMCall(&Hdr, sizeof(Hdr));
     } while (rc == VERR_INTERRUPTED);
@@ -403,6 +403,6 @@
 
 /**
- * Asks the host guest control service to set a command filter to this
- * client so that it only will receive certain commands in the future.
+ * Asks the host guest control service to set a message filter to this
+ * client so that it only will receive certain messages in the future.
  * The filter(s) are a bitmask for the context IDs, served from the host.
  *
@@ -415,5 +415,5 @@
 VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t idClient, uint32_t uValue, uint32_t uMaskAdd, uint32_t uMaskRemove)
 {
-    HGCMMsgCmdFilterSet Msg;
+    HGCMMsgFilterSet Msg;
 
     /* Tell the host we want to set a filter. */
@@ -443,5 +443,5 @@
     /* Everything else is optional. */
 
-    HGCMMsgCmdReply Msg;
+    HGCMMsgReply Msg;
     VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_REPLY, 4);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
@@ -491,7 +491,7 @@
 VBGLR3DECL(int) VbglR3GuestCtrlMsgSkipOld(uint32_t idClient)
 {
-    HGCMMsgCmdSkip Msg;
-
-    /* Tell the host we want to skip the current assigned command. */
+    HGCMMsgSkip Msg;
+
+    /* Tell the host we want to skip the current assigned message. */
     VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_MSG_SKIP_OLD, 1);
     VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */);
@@ -530,5 +530,5 @@
             HGCMFunctionParameter   pKey;
         } Msg;
-        VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_SESSION_PREPARE, 2);
+        VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_MSG_SESSION_PREPARE, 2);
         VbglHGCMParmUInt32Set(&Msg.idSession, idSession);
         VbglHGCMParmPtrSet(&Msg.pKey, (void *)pvKey, cbKey);
@@ -555,5 +555,5 @@
             HGCMFunctionParameter   pKey;
         } Msg;
-        VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_SESSION_ACCEPT, 2);
+        VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_MSG_SESSION_ACCEPT, 2);
         VbglHGCMParmUInt32Set(&Msg.idSession, idSession);
         VbglHGCMParmPtrSet(&Msg.pKey, (void *)pvKey, cbKey);
@@ -579,5 +579,5 @@
             HGCMFunctionParameter   idSession;
         } Msg;
-        VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_SESSION_CANCEL_PREPARED, 1);
+        VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_MSG_SESSION_CANCEL_PREPARED, 1);
         VbglHGCMParmUInt32Set(&Msg.idSession, idSession);
         rc = VbglR3HGCMCall(&Msg.Hdr, sizeof(Msg));
@@ -601,5 +601,5 @@
 
     HGCMMsgSessionClose Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_SESSION_CLOSE, pCtx->uNumParms);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_SESSION_CLOSE, pCtx->uNumParms);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.flags, fFlags);
@@ -614,5 +614,5 @@
 
     HGCMMsgSessionNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_SESSION_NOTIFY, 3);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_SESSION_NOTIFY, 3);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, uType);
@@ -647,5 +647,5 @@
         HGCMMsgSessionOpen Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_SESSION_CREATE);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_SESSION_CREATE);
         VbglHGCMParmUInt32Set(&Msg.protocol, 0);
         VbglHGCMParmPtrSet(&Msg.username, pszUser, cbUser);
@@ -685,5 +685,5 @@
         HGCMMsgSessionClose Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_SESSION_CLOSE);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_SESSION_CLOSE);
         VbglHGCMParmUInt32Set(&Msg.flags, 0);
 
@@ -724,5 +724,5 @@
         HGCMMsgPathRename Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_PATH_RENAME);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_PATH_RENAME);
         VbglHGCMParmPtrSet(&Msg.source, pszSource, cbSource);
         VbglHGCMParmPtrSet(&Msg.dest, pszDest, cbDest);
@@ -754,5 +754,5 @@
         HGCMMsgPathUserDocuments Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_PATH_USER_DOCUMENTS);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_PATH_USER_DOCUMENTS);
 
         rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
@@ -777,5 +777,5 @@
         HGCMMsgPathUserHome Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_PATH_USER_HOME);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_PATH_USER_HOME);
 
         rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
@@ -819,5 +819,5 @@
         HGCMMsgProcExec Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_EXEC_CMD);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_EXEC_CMD);
         VbglHGCMParmPtrSet(&Msg.cmd, pszCmd, cbCmd);
         VbglHGCMParmUInt32Set(&Msg.flags, 0);
@@ -894,5 +894,5 @@
         HGCMMsgProcOutput Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_EXEC_GET_OUTPUT);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_EXEC_GET_OUTPUT);
         VbglHGCMParmUInt32Set(&Msg.pid, 0);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
@@ -936,5 +936,5 @@
         HGCMMsgProcInput Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_EXEC_SET_INPUT);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_EXEC_SET_INPUT);
         VbglHGCMParmUInt32Set(&Msg.pid, 0);
         VbglHGCMParmUInt32Set(&Msg.flags, 0);
@@ -978,5 +978,5 @@
         HGCMMsgDirRemove Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_DIR_REMOVE);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_DIR_REMOVE);
         VbglHGCMParmPtrSet(&Msg.path, pszPath, cbPath);
         VbglHGCMParmUInt32Set(&Msg.flags, 0);
@@ -1023,5 +1023,5 @@
         HGCMMsgFileOpen Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_OPEN);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_OPEN);
         VbglHGCMParmPtrSet(&Msg.filename, pszFileName, cbFileName);
         VbglHGCMParmPtrSet(&Msg.openmode, pszAccess, cbAccess);
@@ -1058,5 +1058,5 @@
         HGCMMsgFileClose Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_CLOSE);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_CLOSE);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
 
@@ -1088,5 +1088,5 @@
         HGCMMsgFileRead Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_READ);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_READ);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
         VbglHGCMParmUInt32Set(&Msg.size, 0);
@@ -1121,5 +1121,5 @@
         HGCMMsgFileReadAt Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_READ_AT);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_READ_AT);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
         VbglHGCMParmUInt32Set(&Msg.offset, 0);
@@ -1158,5 +1158,5 @@
         HGCMMsgFileWrite Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_WRITE);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_WRITE);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
         VbglHGCMParmPtrSet(&Msg.data, pvData, cbData);
@@ -1198,5 +1198,5 @@
         HGCMMsgFileWriteAt Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_WRITE_AT);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_WRITE_AT);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
         VbglHGCMParmPtrSet(&Msg.data, pvData, cbData);
@@ -1239,5 +1239,5 @@
         HGCMMsgFileSeek Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_SEEK);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_SEEK);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
         VbglHGCMParmUInt32Set(&Msg.method, 0);
@@ -1272,5 +1272,5 @@
         HGCMMsgFileTell Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_FILE_TELL);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_FILE_TELL);
         VbglHGCMParmUInt32Set(&Msg.handle, 0);
 
@@ -1301,5 +1301,5 @@
         HGCMMsgProcTerminate Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_EXEC_TERMINATE);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_EXEC_TERMINATE);
         VbglHGCMParmUInt32Set(&Msg.pid, 0);
 
@@ -1331,5 +1331,5 @@
         HGCMMsgProcWaitFor Msg;
         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
-        VbglHGCMParmUInt32Set(&Msg.context, HOST_EXEC_WAIT_FOR);
+        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_EXEC_WAIT_FOR);
         VbglHGCMParmUInt32Set(&Msg.pid, 0);
         VbglHGCMParmUInt32Set(&Msg.flags, 0);
@@ -1355,5 +1355,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 4);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_OPEN);
@@ -1371,5 +1371,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 3);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 3);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_CLOSE);
@@ -1385,5 +1385,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 3);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 3);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_ERROR);
@@ -1401,5 +1401,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 4);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_READ);
@@ -1417,5 +1417,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 4);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_WRITE);
@@ -1433,5 +1433,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 4);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_SEEK);
@@ -1449,5 +1449,5 @@
 
     HGCMReplyFileNotify Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_FILE_NOTIFY, 4);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_TELL);
@@ -1472,5 +1472,5 @@
 
     HGCMMsgProcStatus Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_EXEC_STATUS, 5);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_EXEC_STATUS, 5);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.pid, uPID);
@@ -1496,5 +1496,5 @@
 
     HGCMMsgProcOutput Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_EXEC_OUTPUT, 5);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_EXEC_OUTPUT, 5);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.pid, uPID);
@@ -1520,5 +1520,5 @@
 
     HGCMMsgProcStatusInput Msg;
-    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_EXEC_INPUT_STATUS, 5);
+    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_EXEC_INPUT_STATUS, 5);
     VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID);
     VbglHGCMParmUInt32Set(&Msg.pid, uPID);
