Changeset 68458 in vbox
- Timestamp:
- Aug 18, 2017 10:31:10 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest2.h
r62476 r68458 85 85 AssertCompileSize(VBoxGuestHGCMCallInfo, 16); 86 86 87 /** 88 * Initialize a HGCM header (VBoxGuestHGCMCallInfo). 89 * 90 * @param a_pHdr The header to initalize. 91 * @param a_idClient The client connection ID to call thru. 92 * @param a_idFunction The function we're calling 93 * @param a_cParameters Number of parameters. 94 */ 95 # define VBGL_HGCM_HDR_INIT(a_pHdr, a_idClient, a_idFunction, a_cParameters) \ 96 do { \ 97 (a_pHdr)->result = VERR_INTERNAL_ERROR; \ 98 (a_pHdr)->u32ClientID = (a_idClient); \ 99 (a_pHdr)->u32Function = (a_idFunction); \ 100 (a_pHdr)->cParms = (a_cParameters); \ 101 } while (0) 102 87 103 88 104 /** … … 105 121 # pragma pack() 106 122 123 /** 124 * Initialize a HGCM header (VBoxGuestHGCMCallInfo), with timeout (interruptible). 125 * 126 * @param a_pHdr The header to initalize. 127 * @param a_idClient The client connection ID to call thru. 128 * @param a_idFunction The function we're calling 129 * @param a_cParameters Number of parameters. 130 * @param a_cMsTimeout The timeout in milliseconds. 131 */ 132 # define VBGL_HGCM_HDR_INIT_TIMED(a_pHdr, a_idClient, a_idFunction, a_cParameters, a_cMsTimeout) \ 133 do { \ 134 (a_pHdr)->u32Timeout = (a_cMsTimeout); \ 135 (a_pHdr)->fInterruptible = true; \ 136 (a_pHdr)->info.result = VERR_INTERNAL_ERROR; \ 137 (a_pHdr)->info.u32ClientID = (a_idClient); \ 138 (a_pHdr)->info.u32Function = (a_idFunction); \ 139 (a_pHdr)->info.cParms = (a_cParameters); \ 140 } while (0) 141 107 142 /** @} */ 108 143 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCr.cpp
r63062 r68458 840 840 int rc; 841 841 842 parms.hdr.result = VERR_WRONG_ORDER; 843 parms.hdr.u32ClientID = u32ClientID; 844 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_VERSION; 845 parms.hdr.cParms = SHCRGL_CPARMS_SET_VERSION; 842 VBGL_HGCM_HDR_INIT(&parms.hdr, u32ClientID, SHCRGL_GUEST_FN_SET_VERSION, SHCRGL_CPARMS_SET_VERSION); 846 843 847 844 parms.vMajor.type = VMMDevHGCMParmType_32bit; … … 870 867 int rc; 871 868 872 parms.hdr.result = VERR_WRONG_ORDER; 873 parms.hdr.u32ClientID = u32ClientID; 874 parms.hdr.u32Function = SHCRGL_GUEST_FN_GET_CAPS_LEGACY; 875 parms.hdr.cParms = SHCRGL_CPARMS_GET_CAPS_LEGACY; 869 VBGL_HGCM_HDR_INIT(&parms.hdr, u32ClientID, SHCRGL_GUEST_FN_GET_CAPS_LEGACY, SHCRGL_CPARMS_GET_CAPS_LEGACY); 876 870 877 871 parms.Caps.type = VMMDevHGCMParmType_32bit; … … 910 904 int rc; 911 905 912 parms.hdr.result = VERR_WRONG_ORDER; 913 parms.hdr.u32ClientID = u32ClientID; 914 parms.hdr.u32Function = SHCRGL_GUEST_FN_GET_CAPS_NEW; 915 parms.hdr.cParms = SHCRGL_CPARMS_GET_CAPS_NEW; 906 VBGL_HGCM_HDR_INIT(&parms.hdr, u32ClientID, SHCRGL_GUEST_FN_GET_CAPS_NEW, SHCRGL_CPARMS_GET_CAPS_NEW); 916 907 917 908 parms.Caps.type = VMMDevHGCMParmType_LinAddr; … … 948 939 int rc; 949 940 950 parms.hdr.result = VERR_WRONG_ORDER; 951 parms.hdr.u32ClientID = u32ClientID; 952 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID; 953 parms.hdr.cParms = SHCRGL_CPARMS_SET_PID; 941 VBGL_HGCM_HDR_INIT(&parms.hdr, u32ClientID, SHCRGL_GUEST_FN_SET_PID, SHCRGL_CPARMS_SET_PID); 954 942 955 943 parms.u64PID.type = VMMDevHGCMParmType_64bit; -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp
r62521 r68458 97 97 VBoxClipboardGetHostMsg Msg; 98 98 99 Msg.hdr.result = VERR_WRONG_ORDER; 100 Msg.hdr.u32ClientID = idClient; 101 Msg.hdr.u32Function = VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG; 102 Msg.hdr.cParms = 2; 99 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG, 2); 103 100 VbglHGCMParmUInt32Set(&Msg.msg, 0); 104 101 VbglHGCMParmUInt32Set(&Msg.formats, 0); … … 146 143 VBoxClipboardReadData Msg; 147 144 148 Msg.hdr.result = VERR_WRONG_ORDER; 149 Msg.hdr.u32ClientID = idClient; 150 Msg.hdr.u32Function = VBOX_SHARED_CLIPBOARD_FN_READ_DATA; 151 Msg.hdr.cParms = 3; 145 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_FN_READ_DATA, 3); 152 146 VbglHGCMParmUInt32Set(&Msg.format, fFormat); 153 147 VbglHGCMParmPtrSet(&Msg.ptr, pv, cb); … … 186 180 VBoxClipboardFormats Msg; 187 181 188 Msg.hdr.result = VERR_WRONG_ORDER; 189 Msg.hdr.u32ClientID = idClient; 190 Msg.hdr.u32Function = VBOX_SHARED_CLIPBOARD_FN_FORMATS; 191 Msg.hdr.cParms = 1; 182 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_FN_FORMATS, 1); 192 183 VbglHGCMParmUInt32Set(&Msg.formats, fFormats); 193 184 … … 214 205 { 215 206 VBoxClipboardWriteData Msg; 216 Msg.hdr.result = VERR_WRONG_ORDER; 217 Msg.hdr.u32ClientID = idClient; 218 Msg.hdr.u32Function = VBOX_SHARED_CLIPBOARD_FN_WRITE_DATA; 219 Msg.hdr.cParms = 2; 207 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_FN_WRITE_DATA, 2); 220 208 VbglHGCMParmUInt32Set(&Msg.format, fFormat); 221 209 VbglHGCMParmPtrSet(&Msg.ptr, pv, cb); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
r62845 r68458 56 56 * Forward declarations * 57 57 *********************************************************************************************************************************/ 58 58 /** @todo r=bird: What's this? publicly accessible symbol that's not in a header? Shouldn't this be a static function perhaps? */ 59 59 VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr); 60 60 … … 72 72 VBOXDNDNEXTMSGMSG Msg; 73 73 RT_ZERO(Msg); 74 Msg.hdr.result = VERR_WRONG_ORDER; 75 Msg.hdr.u32ClientID = pCtx->uClientID; 76 Msg.hdr.u32Function = GUEST_DND_GET_NEXT_HOST_MSG; 77 Msg.hdr.cParms = 3; 78 74 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GET_NEXT_HOST_MSG, 3); 79 75 Msg.uMsg.SetUInt32(0); 80 76 Msg.cParms.SetUInt32(0); … … 119 115 VBOXDNDHGACTIONMSG Msg; 120 116 RT_ZERO(Msg); 121 Msg.hdr.result = VERR_WRONG_ORDER;122 Msg.hdr.u32ClientID = pCtx->uClientID;123 Msg.hdr.u32Function = uMsg;124 125 117 if (pCtx->uProtocol < 3) 126 118 { 127 Msg.hdr.cParms = 7; 128 119 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, uMsg, 7); 129 120 Msg.u.v1.uScreenId.SetUInt32(0); 130 121 Msg.u.v1.uX.SetUInt32(0); … … 137 128 else 138 129 { 139 Msg.hdr.cParms = 8; 140 130 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, uMsg, 8); 141 131 Msg.u.v3.uContext.SetUInt32(0); 142 132 Msg.u.v3.uScreenId.SetUInt32(0); … … 188 178 VBOXDNDHGLEAVEMSG Msg; 189 179 RT_ZERO(Msg); 190 Msg.hdr.u32ClientID = pCtx->uClientID;191 Msg.hdr.u32Function = HOST_DND_HG_EVT_LEAVE;192 193 180 if (pCtx->uProtocol < 3) 194 { 195 Msg.hdr.cParms = 0; 196 } 181 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_EVT_LEAVE, 0); 197 182 else 198 183 { 199 Msg.hdr.cParms = 1; 200 184 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_EVT_LEAVE, 1); 201 185 /** @todo Context ID not used yet. */ 202 186 Msg.u.v3.uContext.SetUInt32(0); … … 216 200 VBOXDNDHGCANCELMSG Msg; 217 201 RT_ZERO(Msg); 218 Msg.hdr.result = VERR_WRONG_ORDER;219 Msg.hdr.u32ClientID = pCtx->uClientID;220 Msg.hdr.u32Function = HOST_DND_HG_EVT_CANCEL;221 222 202 if (pCtx->uProtocol < 3) 223 { 224 Msg.hdr.cParms = 0; 225 } 203 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_EVT_CANCEL, 0); 226 204 else 227 205 { 228 Msg.hdr.cParms = 1; 229 206 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_EVT_CANCEL, 1); 230 207 /** @todo Context ID not used yet. */ 231 208 Msg.u.v3.uContext.SetUInt32(0); … … 253 230 VBOXDNDHGSENDDIRMSG Msg; 254 231 RT_ZERO(Msg); 255 Msg.hdr.result = VERR_WRONG_ORDER;256 Msg.hdr.u32ClientID = pCtx->uClientID;257 Msg.hdr.u32Function = HOST_DND_HG_SND_DIR;258 259 232 if (pCtx->uProtocol < 3) 260 233 { 261 Msg.hdr.cParms = 3; 262 234 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_DIR, 3); 263 235 Msg.u.v1.pvName.SetPtr(pszDirname, cbDirname); 264 236 Msg.u.v1.cbName.SetUInt32(cbDirname); … … 267 239 else 268 240 { 269 Msg.hdr.cParms = 4; 270 241 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_DIR, 4); 271 242 /** @todo Context ID not used yet. */ 272 243 Msg.u.v3.uContext.SetUInt32(0); … … 321 292 VBOXDNDHGSENDFILEDATAMSG Msg; 322 293 RT_ZERO(Msg); 323 Msg.hdr.result = VERR_WRONG_ORDER;324 Msg.hdr.u32ClientID = pCtx->uClientID;325 Msg.hdr.u32Function = HOST_DND_HG_SND_FILE_DATA;326 327 294 if (pCtx->uProtocol <= 1) 328 295 { 296 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_FILE_DATA, 5); 329 297 Msg.u.v1.pvName.SetPtr(pszFilename, cbFilename); 330 298 Msg.u.v1.cbName.SetUInt32(0); … … 332 300 Msg.u.v1.cbData.SetUInt32(0); 333 301 Msg.u.v1.fMode.SetUInt32(0); 334 335 Msg.hdr.cParms = 5;336 302 } 337 303 else if (pCtx->uProtocol == 2) 338 304 { 305 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_FILE_DATA, 3); 339 306 Msg.u.v2.uContext.SetUInt32(0); 340 307 Msg.u.v2.pvData.SetPtr(pvData, cbData); 341 308 Msg.u.v2.cbData.SetUInt32(cbData); 342 343 Msg.hdr.cParms = 3;344 309 } 345 310 else if (pCtx->uProtocol >= 3) 346 311 { 312 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_FILE_DATA, 5); 347 313 Msg.u.v3.uContext.SetUInt32(0); 348 314 Msg.u.v3.pvData.SetPtr(pvData, cbData); … … 350 316 Msg.u.v3.pvChecksum.SetPtr(NULL, 0); 351 317 Msg.u.v3.cbChecksum.SetUInt32(0); 352 353 Msg.hdr.cParms = 5;354 318 } 355 319 else … … 408 372 VBOXDNDHGSENDFILEHDRMSG Msg; 409 373 RT_ZERO(Msg); 410 Msg.hdr.result = VERR_WRONG_ORDER;411 Msg.hdr.u32ClientID = pCtx->uClientID;412 Msg.hdr.u32Function = HOST_DND_HG_SND_FILE_HDR;413 414 374 int rc; 415 416 375 if (pCtx->uProtocol <= 1) 417 {418 376 rc = VERR_NOT_SUPPORTED; 419 }420 377 else 421 378 { 422 Msg.hdr.cParms = 6; 423 379 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_FILE_HDR, 6); 424 380 Msg.uContext.SetUInt32(0); /** @todo Not used yet. */ 425 381 Msg.pvName.SetPtr(pszFilename, cbFilename); … … 780 736 VBOXDNDHGSENDDATAMSG Msg; 781 737 RT_ZERO(Msg); 782 Msg.hdr.result = VERR_WRONG_ORDER;783 Msg.hdr.u32ClientID = pCtx->uClientID;784 Msg.hdr.u32Function = HOST_DND_HG_SND_DATA;785 786 738 int rc; 787 739 if (pCtx->uProtocol < 3) 788 740 { 789 Msg.hdr.cParms = 5; 790 741 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_DATA, 5); 791 742 Msg.u.v1.uScreenId.SetUInt32(0); 792 743 Msg.u.v1.pvFormat.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt); … … 849 800 else /* Protocol v3 and up. */ 850 801 { 851 Msg.hdr.cParms = 5; 852 802 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_DATA, 5); 853 803 Msg.u.v3.uContext.SetUInt32(0); 854 804 Msg.u.v3.pvData.SetPtr(pvData, cbData); … … 893 843 VBOXDNDHGSENDDATAHDRMSG Msg; 894 844 RT_ZERO(Msg); 895 Msg.hdr.result = VERR_WRONG_ORDER; 896 Msg.hdr.u32ClientID = pCtx->uClientID; 897 Msg.hdr.u32Function = HOST_DND_HG_SND_DATA_HDR; 898 Msg.hdr.cParms = 12; 899 845 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_DATA_HDR, 12); 900 846 Msg.uContext.SetUInt32(0); 901 847 Msg.uFlags.SetUInt32(0); … … 944 890 VBOXDNDHGSENDMOREDATAMSG Msg; 945 891 RT_ZERO(Msg); 946 Msg.hdr.result = VERR_WRONG_ORDER; 947 Msg.hdr.u32ClientID = pCtx->uClientID; 948 Msg.hdr.u32Function = HOST_DND_HG_SND_MORE_DATA; 949 Msg.hdr.cParms = 2; 950 892 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_MORE_DATA, 2); 951 893 Msg.pvData.SetPtr(pvData, cbData); 952 894 Msg.cbData.SetUInt32(0); … … 1235 1177 VBOXDNDGHREQPENDINGMSG Msg; 1236 1178 RT_ZERO(Msg); 1237 Msg.hdr.result = VERR_WRONG_ORDER;1238 Msg.hdr.u32ClientID = pCtx->uClientID;1239 Msg.hdr.u32Function = HOST_DND_GH_REQ_PENDING;1240 1241 1179 if (pCtx->uProtocol < 3) 1242 1180 { 1243 Msg.hdr.cParms = 1; 1244 1181 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_GH_REQ_PENDING, 1); 1245 1182 Msg.u.v1.uScreenId.SetUInt32(0); 1246 1183 } 1247 1184 else 1248 1185 { 1249 Msg.hdr.cParms = 2; 1250 1186 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_GH_REQ_PENDING, 2); 1251 1187 /** @todo Context ID not used yet. */ 1252 1188 Msg.u.v3.uContext.SetUInt32(0); … … 1289 1225 VBOXDNDGHDROPPEDMSG Msg; 1290 1226 RT_ZERO(Msg); 1291 Msg.hdr.result = VERR_WRONG_ORDER;1292 Msg.hdr.u32ClientID = pCtx->uClientID;1293 Msg.hdr.u32Function = HOST_DND_GH_EVT_DROPPED;1294 1295 1227 if (pCtx->uProtocol < 3) 1296 1228 { 1297 Msg.hdr.cParms = 3; 1298 1229 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_GH_EVT_DROPPED, 3); 1299 1230 Msg.u.v1.pvFormat.SetPtr(pszFormat, cbFormat); 1300 1231 Msg.u.v1.cbFormat.SetUInt32(0); … … 1303 1234 else 1304 1235 { 1305 Msg.hdr.cParms = 4; 1306 1236 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_GH_EVT_DROPPED, 4); 1307 1237 Msg.u.v3.uContext.SetUInt32(0); 1308 1238 Msg.u.v3.pvFormat.SetPtr(pszFormat, cbFormat); … … 1417 1347 VBOXDNDCONNECTMSG Msg; 1418 1348 RT_ZERO(Msg); 1419 Msg.hdr.result = VERR_WRONG_ORDER;1420 Msg.hdr.u32ClientID = pCtx->uClientID;1421 Msg.hdr.u32Function = GUEST_DND_CONNECT;1422 1423 1349 if (pCtx->uProtocol < 3) 1424 1350 { 1425 Msg.hdr.cParms = 2; 1426 1351 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_CONNECT, 2); 1427 1352 Msg.u.v2.uProtocol.SetUInt32(pCtx->uProtocol); 1428 1353 Msg.u.v2.uFlags.SetUInt32(0); /* Unused at the moment. */ … … 1430 1355 else 1431 1356 { 1432 Msg.hdr.cParms = 3; 1433 1357 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_CONNECT, 3); 1434 1358 /** @todo Context ID not used yet. */ 1435 1359 Msg.u.v3.uContext.SetUInt32(0); … … 1609 1533 VBOXDNDHGACKOPMSG Msg; 1610 1534 RT_ZERO(Msg); 1611 Msg.hdr.result = VERR_WRONG_ORDER;1612 Msg.hdr.u32ClientID = pCtx->uClientID;1613 Msg.hdr.u32Function = GUEST_DND_HG_ACK_OP;1614 1615 1535 LogFlowFunc(("uProto=%RU32\n", pCtx->uProtocol)); 1616 1617 1536 if (pCtx->uProtocol < 3) 1618 1537 { 1619 Msg.hdr.cParms = 1; 1620 1538 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_HG_ACK_OP, 1); 1621 1539 Msg.u.v1.uAction.SetUInt32(uAction); 1622 1540 } 1623 1541 else 1624 1542 { 1625 Msg.hdr.cParms = 2; 1626 1543 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_HG_ACK_OP, 2); 1627 1544 /** @todo Context ID not used yet. */ 1628 1545 Msg.u.v3.uContext.SetUInt32(0); … … 1641 1558 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 1642 1559 AssertPtrReturn(pcszFormat, VERR_INVALID_POINTER); 1560 if (!RTStrIsValidEncoding(pcszFormat)) 1561 return VERR_INVALID_PARAMETER; 1562 1563 const uint32_t cbFormat = (uint32_t)strlen(pcszFormat) + 1; /* Include termination */ 1643 1564 1644 1565 VBOXDNDHGREQDATAMSG Msg; 1645 1566 RT_ZERO(Msg); 1646 Msg.hdr.result = VERR_WRONG_ORDER;1647 Msg.hdr.u32ClientID = pCtx->uClientID;1648 Msg.hdr.u32Function = GUEST_DND_HG_REQ_DATA;1649 1650 if (!RTStrIsValidEncoding(pcszFormat))1651 return VERR_INVALID_PARAMETER;1652 1653 const uint32_t cbFormat = (uint32_t)strlen(pcszFormat) + 1; /* Include termination */1654 1655 1567 if (pCtx->uProtocol < 3) 1656 1568 { 1657 Msg.hdr.cParms = 1; 1658 1569 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_HG_REQ_DATA, 1); 1659 1570 Msg.u.v1.pvFormat.SetPtr((void*)pcszFormat, cbFormat); 1660 1571 } 1661 1572 else 1662 1573 { 1663 Msg.hdr.cParms = 3; 1664 1574 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_HG_REQ_DATA, 3); 1665 1575 /** @todo Context ID not used yet. */ 1666 1576 Msg.u.v3.uContext.SetUInt32(0); … … 1683 1593 VBOXDNDHGEVTPROGRESSMSG Msg; 1684 1594 RT_ZERO(Msg); 1685 Msg.hdr.result = VERR_WRONG_ORDER;1686 Msg.hdr.u32ClientID = pCtx->uClientID;1687 Msg.hdr.u32Function = uStatus;1688 1689 1595 if (pCtx->uProtocol < 3) 1690 1596 { 1691 Msg.hdr.cParms = 3; 1692 1597 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, uStatus, 3); /** @todo r=bird: Do we really mean to execute 'uStatus' here? */ 1693 1598 Msg.u.v1.uStatus.SetUInt32(uStatus); 1694 1599 Msg.u.v1.uPercent.SetUInt32(uPercent); … … 1697 1602 else 1698 1603 { 1699 Msg.hdr.cParms = 4; 1700 1604 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, uStatus, 4); /** @todo r=bird: Do we really mean to execute 'uStatus' here? */ 1701 1605 /** @todo Context ID not used yet. */ 1702 1606 Msg.u.v3.uContext.SetUInt32(0); … … 1714 1618 1715 1619 #ifdef VBOX_WITH_DRAG_AND_DROP_GH 1620 1716 1621 VBGLR3DECL(int) VbglR3DnDGHSendAckPending(PVBGLR3GUESTDNDCMDCTX pCtx, 1717 1622 uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormats, uint32_t cbFormats) … … 1726 1631 VBOXDNDGHACKPENDINGMSG Msg; 1727 1632 RT_ZERO(Msg); 1728 Msg.hdr.result = VERR_WRONG_ORDER;1729 Msg.hdr.u32ClientID = pCtx->uClientID;1730 Msg.hdr.u32Function = GUEST_DND_GH_ACK_PENDING;1731 1732 1633 if (pCtx->uProtocol < 3) 1733 1634 { 1734 Msg.hdr.cParms = 3; 1735 1635 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_ACK_PENDING, 3); 1736 1636 Msg.u.v1.uDefAction.SetUInt32(uDefAction); 1737 1637 Msg.u.v1.uAllActions.SetUInt32(uAllActions); … … 1740 1640 else 1741 1641 { 1742 Msg.hdr.cParms = 5; 1743 1642 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_ACK_PENDING, 5); 1744 1643 /** @todo Context ID not used yet. */ 1745 1644 Msg.u.v3.uContext.SetUInt32(0); … … 1775 1674 VBOXDNDGHSENDDATAHDRMSG Msg; 1776 1675 RT_ZERO(Msg); 1777 Msg.hdr.result = VERR_WRONG_ORDER; 1778 Msg.hdr.u32ClientID = pCtx->uClientID; 1779 Msg.hdr.u32Function = GUEST_DND_GH_SND_DATA_HDR; 1780 Msg.hdr.cParms = 12; 1781 1676 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_DATA_HDR, 12); 1782 1677 Msg.uContext.SetUInt32(0); /** @todo Not used yet. */ 1783 1678 Msg.uFlags.SetUInt32(0); /** @todo Not used yet. */ … … 1805 1700 VBOXDNDGHSENDDATAMSG Msg; 1806 1701 RT_ZERO(Msg); 1807 Msg.hdr.result = VERR_WRONG_ORDER;1808 Msg.hdr.u32ClientID = pCtx->uClientID;1809 Msg.hdr.u32Function = GUEST_DND_GH_SND_DATA;1810 1811 1702 if (pCtx->uProtocol >= 3) 1812 1703 { 1813 Msg.hdr.cParms = 5; 1814 1704 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_DATA, 5); 1815 1705 Msg.u.v3.uContext.SetUInt32(0); /** @todo Not used yet. */ 1816 1706 Msg.u.v3.pvChecksum.SetPtr(NULL, 0); /** @todo Not used yet. */ … … 1819 1709 else 1820 1710 { 1821 Msg.hdr.cParms = 2;1711 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_DATA, 2); 1822 1712 1823 1713 /* Total amount of bytes to send (meta data + all directory/file objects). */ … … 1878 1768 VBOXDNDGHSENDDIRMSG Msg; 1879 1769 RT_ZERO(Msg); 1880 Msg.hdr.result = VERR_WRONG_ORDER;1881 Msg.hdr.u32ClientID = pCtx->uClientID;1882 Msg.hdr.u32Function = GUEST_DND_GH_SND_DIR;1883 1884 1770 if (pCtx->uProtocol < 3) 1885 1771 { 1886 Msg.hdr.cParms = 3; 1887 1772 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_DIR, 3); 1888 1773 Msg.u.v1.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)cbPath); 1889 1774 Msg.u.v1.cbName.SetUInt32((uint32_t)cbPath); … … 1892 1777 else 1893 1778 { 1894 Msg.hdr.cParms = 4; 1895 1779 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_DIR, 4); 1896 1780 /** @todo Context ID not used yet. */ 1897 1781 Msg.u.v3.uContext.SetUInt32(0); … … 1933 1817 VBOXDNDGHSENDFILEHDRMSG MsgHdr; 1934 1818 RT_ZERO(MsgHdr); 1935 MsgHdr.hdr.result = VERR_WRONG_ORDER; 1936 MsgHdr.hdr.u32ClientID = pCtx->uClientID; 1937 MsgHdr.hdr.u32Function = GUEST_DND_GH_SND_FILE_HDR; 1938 MsgHdr.hdr.cParms = 6; 1939 1819 VBGL_HGCM_HDR_INIT(&MsgHdr.hdr, pCtx->uClientID, GUEST_DND_GH_SND_FILE_HDR, 6); 1940 1820 MsgHdr.uContext.SetUInt32(0); /* Context ID; unused at the moment. */ 1941 1821 MsgHdr.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)(strPath.length() + 1)); … … 1961 1841 VBOXDNDGHSENDFILEDATAMSG Msg; 1962 1842 RT_ZERO(Msg); 1963 Msg.hdr.result = VERR_WRONG_ORDER;1964 Msg.hdr.u32ClientID = pCtx->uClientID;1965 Msg.hdr.u32Function = GUEST_DND_GH_SND_FILE_DATA;1966 1967 1843 switch (pCtx->uProtocol) 1968 1844 { 1969 1845 case 3: 1970 1846 { 1971 Msg.hdr.cParms = 5; 1972 1847 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_FILE_DATA, 5); 1973 1848 Msg.u.v3.uContext.SetUInt32(0); 1974 1849 Msg.u.v3.pvChecksum.SetPtr(NULL, 0); … … 1979 1854 case 2: 1980 1855 { 1981 Msg.hdr.cParms = 3; 1982 1856 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_FILE_DATA, 3); 1983 1857 Msg.u.v2.uContext.SetUInt32(0); 1984 1858 break; … … 1987 1861 default: /* Protocol v1 */ 1988 1862 { 1989 Msg.hdr.cParms = 5; 1990 1863 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_SND_FILE_DATA, 5); 1991 1864 Msg.u.v1.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)(strPath.length() + 1)); 1992 1865 Msg.u.v1.cbName.SetUInt32((uint32_t)(strPath.length() + 1)); … … 2203 2076 VBOXDNDGHEVTERRORMSG Msg; 2204 2077 RT_ZERO(Msg); 2205 Msg.hdr.result = VERR_WRONG_ORDER;2206 Msg.hdr.u32ClientID = pCtx->uClientID;2207 Msg.hdr.u32Function = GUEST_DND_GH_EVT_ERROR;2208 2209 2078 if (pCtx->uProtocol < 3) 2210 2079 { 2211 Msg.hdr.cParms = 1; 2212 2080 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_EVT_ERROR, 1); 2213 2081 Msg.u.v1.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */ 2214 2082 } 2215 2083 else 2216 2084 { 2217 Msg.hdr.cParms = 2; 2218 2085 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GH_EVT_ERROR, 2); 2219 2086 /** @todo Context ID not used yet. */ 2220 2087 Msg.u.v3.uContext.SetUInt32(0); … … 2238 2105 return rc; 2239 2106 } 2107 2240 2108 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */ 2241 2109 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r62847 r68458 104 104 105 105 HGCMMsgCmdWaitFor Msg; 106 107 Msg.hdr.result = VERR_WRONG_ORDER; 108 Msg.hdr.u32ClientID = uClientId; 109 Msg.hdr.u32Function = GUEST_MSG_WAIT; /* Tell the host we want our next command. */ 110 Msg.hdr.cParms = 2; /* Just peek for the next message! */ 111 106 VBGL_HGCM_HDR_INIT(&Msg.hdr, uClientId, 107 GUEST_MSG_WAIT, /* Tell the host we want our next command. */ 108 2); /* Just peek for the next message! */ 112 109 VbglHGCMParmUInt32Set(&Msg.msg, 0); 113 110 VbglHGCMParmUInt32Set(&Msg.num_parms, 0); … … 145 142 HGCMMsgCmdFilterSet Msg; 146 143 147 Msg.hdr.result = VERR_WRONG_ORDER; 148 Msg.hdr.u32ClientID = uClientId; 149 Msg.hdr.u32Function = GUEST_MSG_FILTER_SET; /* Tell the host we want to set a filter. */ 150 Msg.hdr.cParms = 4; 151 144 /* Tell the host we want to set a filter. */ 145 VBGL_HGCM_HDR_INIT(&Msg.hdr, uClientId, GUEST_MSG_FILTER_SET, 4); 152 146 VbglHGCMParmUInt32Set(&Msg.value, uValue); 153 147 VbglHGCMParmUInt32Set(&Msg.mask_add, uMaskAdd); … … 170 164 VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterUnset(uint32_t uClientId) 171 165 { 166 /* Tell the host we want to unset the filter. */ 172 167 HGCMMsgCmdFilterUnset Msg; 173 174 Msg.hdr.result = VERR_WRONG_ORDER; 175 Msg.hdr.u32ClientID = uClientId; 176 Msg.hdr.u32Function = GUEST_MSG_FILTER_UNSET; /* Tell the host we want to unset the filter. */ 177 Msg.hdr.cParms = 1; 178 168 VBGL_HGCM_HDR_INIT(&Msg.hdr, uClientId, GUEST_MSG_FILTER_UNSET, 1); 179 169 VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */); 180 170 … … 202 192 203 193 HGCMMsgCmdReply Msg; 204 205 Msg.hdr.result = VERR_WRONG_ORDER; 206 Msg.hdr.u32ClientID = pCtx->uClientID; 207 Msg.hdr.u32Function = GUEST_MSG_REPLY; 208 Msg.hdr.cParms = 4; 209 194 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_REPLY, 4); 210 195 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 211 196 VbglHGCMParmUInt32Set(&Msg.rc, (uint32_t)rc); /* int vs. uint32_t */ … … 235 220 HGCMMsgCmdSkip Msg; 236 221 237 Msg.hdr.result = VERR_WRONG_ORDER; 238 Msg.hdr.u32ClientID = uClientId; 239 Msg.hdr.u32Function = GUEST_MSG_SKIP; /* Tell the host we want to skip 240 the current assigned command. */ 241 Msg.hdr.cParms = 1; 242 222 /* Tell the host we want to skip the current assigned command. */ 223 VBGL_HGCM_HDR_INIT(&Msg.hdr, uClientId, GUEST_MSG_SKIP, 1); 243 224 VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */); 244 225 … … 260 241 { 261 242 HGCMMsgCancelPendingWaits Msg; 262 263 Msg.hdr.result = VERR_WRONG_ORDER; 264 Msg.hdr.u32ClientID = uClientId; 265 Msg.hdr.u32Function = GUEST_CANCEL_PENDING_WAITS; 266 Msg.hdr.cParms = 0; 267 243 VBGL_HGCM_HDR_INIT(&Msg.hdr, uClientId, GUEST_CANCEL_PENDING_WAITS, 0); 268 244 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 269 245 if (RT_SUCCESS(rc)) … … 291 267 292 268 HGCMMsgSessionClose Msg; 293 294 Msg.hdr.result = VERR_WRONG_ORDER; 295 Msg.hdr.u32ClientID = pCtx->uClientID; 296 Msg.hdr.u32Function = GUEST_SESSION_CLOSE; 297 Msg.hdr.cParms = pCtx->uNumParms; 298 269 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_SESSION_CLOSE, pCtx->uNumParms); 299 270 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 300 271 VbglHGCMParmUInt32Set(&Msg.flags, fFlags); … … 317 288 318 289 HGCMMsgSessionNotify Msg; 319 320 Msg.hdr.result = VERR_WRONG_ORDER; 321 Msg.hdr.u32ClientID = pCtx->uClientID; 322 Msg.hdr.u32Function = GUEST_SESSION_NOTIFY; 323 Msg.hdr.cParms = 3; 324 290 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_SESSION_NOTIFY, 3); 325 291 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 326 292 VbglHGCMParmUInt32Set(&Msg.type, uType); … … 361 327 362 328 HGCMMsgSessionOpen Msg; 363 364 Msg.hdr.result = VERR_WRONG_ORDER; 365 Msg.hdr.u32ClientID = pCtx->uClientID; 366 Msg.hdr.u32Function = GUEST_MSG_WAIT; 367 Msg.hdr.cParms = pCtx->uNumParms; 368 329 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 369 330 VbglHGCMParmUInt32Set(&Msg.context, 0); 370 331 VbglHGCMParmUInt32Set(&Msg.protocol, 0); … … 411 372 412 373 HGCMMsgSessionClose Msg; 413 414 Msg.hdr.result = VERR_WRONG_ORDER; 415 Msg.hdr.u32ClientID = pCtx->uClientID; 416 Msg.hdr.u32Function = GUEST_MSG_WAIT; 417 Msg.hdr.cParms = pCtx->uNumParms; 418 374 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 419 375 VbglHGCMParmUInt32Set(&Msg.context, 0); 420 376 VbglHGCMParmUInt32Set(&Msg.flags, 0); … … 457 413 458 414 HGCMMsgPathRename Msg; 459 460 Msg.hdr.result = VERR_WRONG_ORDER; 461 Msg.hdr.u32ClientID = pCtx->uClientID; 462 Msg.hdr.u32Function = GUEST_MSG_WAIT; 463 Msg.hdr.cParms = pCtx->uNumParms; 464 415 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 465 416 VbglHGCMParmUInt32Set(&Msg.context, 0); 466 417 VbglHGCMParmPtrSet(&Msg.source, pszSource, cbSource); … … 518 469 519 470 HGCMMsgProcExec Msg; 520 521 Msg.hdr.result = VERR_WRONG_ORDER; 522 Msg.hdr.u32ClientID = pCtx->uClientID; 523 Msg.hdr.u32Function = GUEST_MSG_WAIT; 524 Msg.hdr.cParms = pCtx->uNumParms; 525 471 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 526 472 VbglHGCMParmUInt32Set(&Msg.context, 0); 527 473 VbglHGCMParmPtrSet(&Msg.cmd, pszCmd, cbCmd); … … 604 550 605 551 HGCMMsgProcOutput Msg; 606 607 Msg.hdr.result = VERR_WRONG_ORDER; 608 Msg.hdr.u32ClientID = pCtx->uClientID; 609 Msg.hdr.u32Function = GUEST_MSG_WAIT; 610 Msg.hdr.cParms = pCtx->uNumParms; 611 552 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 612 553 VbglHGCMParmUInt32Set(&Msg.context, 0); 613 554 VbglHGCMParmUInt32Set(&Msg.pid, 0); … … 658 599 659 600 HGCMMsgProcInput Msg; 660 661 Msg.hdr.result = VERR_WRONG_ORDER; 662 Msg.hdr.u32ClientID = pCtx->uClientID; 663 Msg.hdr.u32Function = GUEST_MSG_WAIT; 664 Msg.hdr.cParms = pCtx->uNumParms; 665 601 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 666 602 VbglHGCMParmUInt32Set(&Msg.context, 0); 667 603 VbglHGCMParmUInt32Set(&Msg.pid, 0); … … 702 638 703 639 HGCMMsgDirRemove Msg; 704 705 Msg.hdr.result = VERR_WRONG_ORDER; 706 Msg.hdr.u32ClientID = pCtx->uClientID; 707 Msg.hdr.u32Function = GUEST_MSG_WAIT; 708 Msg.hdr.cParms = pCtx->uNumParms; 709 640 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 710 641 VbglHGCMParmUInt32Set(&Msg.context, 0); 711 642 VbglHGCMParmPtrSet(&Msg.path, pszPath, cbPath); … … 753 684 754 685 HGCMMsgFileOpen Msg; 755 756 Msg.hdr.result = VERR_WRONG_ORDER; 757 Msg.hdr.u32ClientID = pCtx->uClientID; 758 Msg.hdr.u32Function = GUEST_MSG_WAIT; 759 Msg.hdr.cParms = pCtx->uNumParms; 760 686 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 761 687 VbglHGCMParmUInt32Set(&Msg.context, 0); 762 688 VbglHGCMParmPtrSet(&Msg.filename, pszFileName, cbFileName); … … 794 720 795 721 HGCMMsgFileClose Msg; 796 797 Msg.hdr.result = VERR_WRONG_ORDER; 798 Msg.hdr.u32ClientID = pCtx->uClientID; 799 Msg.hdr.u32Function = GUEST_MSG_WAIT; 800 Msg.hdr.cParms = pCtx->uNumParms; 801 722 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 802 723 VbglHGCMParmUInt32Set(&Msg.context, 0); 803 724 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 831 752 832 753 HGCMMsgFileRead Msg; 833 834 Msg.hdr.result = VERR_WRONG_ORDER; 835 Msg.hdr.u32ClientID = pCtx->uClientID; 836 Msg.hdr.u32Function = GUEST_MSG_WAIT; 837 Msg.hdr.cParms = pCtx->uNumParms; 838 754 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 839 755 VbglHGCMParmUInt32Set(&Msg.context, 0); 840 756 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 870 786 871 787 HGCMMsgFileReadAt Msg; 872 873 Msg.hdr.result = VERR_WRONG_ORDER; 874 Msg.hdr.u32ClientID = pCtx->uClientID; 875 Msg.hdr.u32Function = GUEST_MSG_WAIT; 876 Msg.hdr.cParms = pCtx->uNumParms; 877 788 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 878 789 VbglHGCMParmUInt32Set(&Msg.context, 0); 879 790 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 913 824 914 825 HGCMMsgFileWrite Msg; 915 916 Msg.hdr.result = VERR_WRONG_ORDER; 917 Msg.hdr.u32ClientID = pCtx->uClientID; 918 Msg.hdr.u32Function = GUEST_MSG_WAIT; 919 Msg.hdr.cParms = pCtx->uNumParms; 920 826 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 921 827 VbglHGCMParmUInt32Set(&Msg.context, 0); 922 828 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 955 861 956 862 HGCMMsgFileWriteAt Msg; 957 958 Msg.hdr.result = VERR_WRONG_ORDER; 959 Msg.hdr.u32ClientID = pCtx->uClientID; 960 Msg.hdr.u32Function = GUEST_MSG_WAIT; 961 Msg.hdr.cParms = pCtx->uNumParms; 962 863 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 963 864 VbglHGCMParmUInt32Set(&Msg.context, 0); 964 865 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 998 899 999 900 HGCMMsgFileSeek Msg; 1000 1001 Msg.hdr.result = VERR_WRONG_ORDER; 1002 Msg.hdr.u32ClientID = pCtx->uClientID; 1003 Msg.hdr.u32Function = GUEST_MSG_WAIT; 1004 Msg.hdr.cParms = pCtx->uNumParms; 1005 901 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 1006 902 VbglHGCMParmUInt32Set(&Msg.context, 0); 1007 903 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 1037 933 1038 934 HGCMMsgFileTell Msg; 1039 1040 Msg.hdr.result = VERR_WRONG_ORDER; 1041 Msg.hdr.u32ClientID = pCtx->uClientID; 1042 Msg.hdr.u32Function = GUEST_MSG_WAIT; 1043 Msg.hdr.cParms = pCtx->uNumParms; 1044 935 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 1045 936 VbglHGCMParmUInt32Set(&Msg.context, 0); 1046 937 VbglHGCMParmUInt32Set(&Msg.handle, 0); … … 1072 963 1073 964 HGCMMsgProcTerminate Msg; 1074 1075 Msg.hdr.result = VERR_WRONG_ORDER; 1076 Msg.hdr.u32ClientID = pCtx->uClientID; 1077 Msg.hdr.u32Function = GUEST_MSG_WAIT; 1078 Msg.hdr.cParms = pCtx->uNumParms; 1079 965 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 1080 966 VbglHGCMParmUInt32Set(&Msg.context, 0); 1081 967 VbglHGCMParmUInt32Set(&Msg.pid, 0); … … 1108 994 1109 995 HGCMMsgProcWaitFor Msg; 1110 1111 Msg.hdr.result = VERR_WRONG_ORDER; 1112 Msg.hdr.u32ClientID = pCtx->uClientID; 1113 Msg.hdr.u32Function = GUEST_MSG_WAIT; 1114 Msg.hdr.cParms = pCtx->uNumParms; 1115 996 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_MSG_WAIT, pCtx->uNumParms); 1116 997 VbglHGCMParmUInt32Set(&Msg.context, 0); 1117 998 VbglHGCMParmUInt32Set(&Msg.pid, 0); … … 1145 1026 1146 1027 HGCMReplyFileNotify Msg; 1147 1148 Msg.hdr.result = VERR_WRONG_ORDER; 1149 Msg.hdr.u32ClientID = pCtx->uClientID; 1150 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1151 Msg.hdr.cParms = 4; 1152 1028 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4); 1153 1029 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1154 1030 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_OPEN); 1155 1031 VbglHGCMParmUInt32Set(&Msg.rc, uRc); 1156 1157 1032 VbglHGCMParmUInt32Set(&Msg.u.open.handle, uFileHandle); 1158 1033 … … 1174 1049 1175 1050 HGCMReplyFileNotify Msg; 1176 1177 Msg.hdr.result = VERR_WRONG_ORDER; 1178 Msg.hdr.u32ClientID = pCtx->uClientID; 1179 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1180 Msg.hdr.cParms = 3; 1181 1051 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 3); 1182 1052 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1183 1053 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_CLOSE); … … 1200 1070 1201 1071 HGCMReplyFileNotify Msg; 1202 1203 Msg.hdr.result = VERR_WRONG_ORDER; 1204 Msg.hdr.u32ClientID = pCtx->uClientID; 1205 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1206 Msg.hdr.cParms = 3; 1207 1072 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 3); 1208 1073 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1209 1074 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_ERROR); … … 1228 1093 1229 1094 HGCMReplyFileNotify Msg; 1230 1231 Msg.hdr.result = VERR_WRONG_ORDER; 1232 Msg.hdr.u32ClientID = pCtx->uClientID; 1233 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1234 Msg.hdr.cParms = 4; 1235 1095 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4); 1236 1096 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1237 1097 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_READ); 1238 1098 VbglHGCMParmUInt32Set(&Msg.rc, uRc); 1239 1240 1099 VbglHGCMParmPtrSet(&Msg.u.read.data, pvData, cbData); 1241 1100 … … 1257 1116 1258 1117 HGCMReplyFileNotify Msg; 1259 1260 Msg.hdr.result = VERR_WRONG_ORDER; 1261 Msg.hdr.u32ClientID = pCtx->uClientID; 1262 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1263 Msg.hdr.cParms = 4; 1264 1118 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4); 1265 1119 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1266 1120 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_WRITE); 1267 1121 VbglHGCMParmUInt32Set(&Msg.rc, uRc); 1268 1269 1122 VbglHGCMParmUInt32Set(&Msg.u.write.written, uWritten); 1270 1123 … … 1286 1139 1287 1140 HGCMReplyFileNotify Msg; 1288 1289 Msg.hdr.result = VERR_WRONG_ORDER; 1290 Msg.hdr.u32ClientID = pCtx->uClientID; 1291 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1292 Msg.hdr.cParms = 4; 1293 1141 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4); 1294 1142 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1295 1143 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_SEEK); 1296 1144 VbglHGCMParmUInt32Set(&Msg.rc, uRc); 1297 1298 1145 VbglHGCMParmUInt64Set(&Msg.u.seek.offset, uOffActual); 1299 1146 … … 1315 1162 1316 1163 HGCMReplyFileNotify Msg; 1317 1318 Msg.hdr.result = VERR_WRONG_ORDER; 1319 Msg.hdr.u32ClientID = pCtx->uClientID; 1320 Msg.hdr.u32Function = GUEST_FILE_NOTIFY; 1321 Msg.hdr.cParms = 4; 1322 1164 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_FILE_NOTIFY, 4); 1323 1165 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1324 1166 VbglHGCMParmUInt32Set(&Msg.type, GUEST_FILE_NOTIFYTYPE_TELL); 1325 1167 VbglHGCMParmUInt32Set(&Msg.rc, uRc); 1326 1327 1168 VbglHGCMParmUInt64Set(&Msg.u.tell.offset, uOffActual); 1328 1169 … … 1351 1192 1352 1193 HGCMMsgProcStatus Msg; 1353 1354 Msg.hdr.result = VERR_WRONG_ORDER; 1355 Msg.hdr.u32ClientID = pCtx->uClientID; 1356 Msg.hdr.u32Function = GUEST_EXEC_STATUS; 1357 Msg.hdr.cParms = 5; 1358 1194 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_EXEC_STATUS, 5); 1359 1195 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1360 1196 VbglHGCMParmUInt32Set(&Msg.pid, uPID); … … 1387 1223 1388 1224 HGCMMsgProcOutput Msg; 1389 1390 Msg.hdr.result = VERR_WRONG_ORDER; 1391 Msg.hdr.u32ClientID = pCtx->uClientID; 1392 Msg.hdr.u32Function = GUEST_EXEC_OUTPUT; 1393 Msg.hdr.cParms = 5; 1394 1225 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_EXEC_OUTPUT, 5); 1395 1226 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1396 1227 VbglHGCMParmUInt32Set(&Msg.pid, uPID); … … 1423 1254 1424 1255 HGCMMsgProcStatusInput Msg; 1425 1426 Msg.hdr.result = VERR_WRONG_ORDER; 1427 Msg.hdr.u32ClientID = pCtx->uClientID; 1428 Msg.hdr.u32Function = GUEST_EXEC_INPUT_STATUS; 1429 Msg.hdr.cParms = 5; 1430 1256 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_EXEC_INPUT_STATUS, 5); 1431 1257 VbglHGCMParmUInt32Set(&Msg.context, pCtx->uContextID); 1432 1258 VbglHGCMParmUInt32Set(&Msg.pid, uPID); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
r62521 r68458 185 185 { 186 186 SetProperty Msg; 187 188 Msg.hdr.result = VERR_WRONG_ORDER; 189 Msg.hdr.u32ClientID = idClient; 190 Msg.hdr.u32Function = SET_PROP_VALUE; 191 Msg.hdr.cParms = 3; 187 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, SET_PROP_VALUE, 3); 192 188 VbglHGCMParmPtrSetString(&Msg.name, pszName); 193 189 VbglHGCMParmPtrSetString(&Msg.value, pszValue); … … 200 196 { 201 197 DelProperty Msg; 202 203 Msg.hdr.result = VERR_WRONG_ORDER; 204 Msg.hdr.u32ClientID = idClient; 205 Msg.hdr.u32Function = DEL_PROP; 206 Msg.hdr.cParms = 1; 198 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, DEL_PROP, 1); 207 199 VbglHGCMParmPtrSetString(&Msg.name, pszName); 208 200 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 234 226 { 235 227 SetPropertyValue Msg; 236 237 Msg.hdr.result = VERR_WRONG_ORDER; 238 Msg.hdr.u32ClientID = idClient; 239 Msg.hdr.u32Function = SET_PROP_VALUE; 240 Msg.hdr.cParms = 2; 228 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, SET_PROP_VALUE, 2); 241 229 VbglHGCMParmPtrSetString(&Msg.name, pszName); 242 230 VbglHGCMParmPtrSetString(&Msg.value, pszValue); … … 248 236 { 249 237 DelProperty Msg; 250 251 Msg.hdr.result = VERR_WRONG_ORDER; 252 Msg.hdr.u32ClientID = idClient; 253 Msg.hdr.u32Function = DEL_PROP; 254 Msg.hdr.cParms = 1; 238 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, DEL_PROP, 1); 255 239 VbglHGCMParmPtrSetString(&Msg.name, pszName); 256 240 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 342 326 */ 343 327 GetProperty Msg; 344 345 Msg.hdr.result = VERR_WRONG_ORDER; 346 Msg.hdr.u32ClientID = idClient; 347 Msg.hdr.u32Function = GET_PROP; 348 Msg.hdr.cParms = 4; 328 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GET_PROP, 4); 349 329 VbglHGCMParmPtrSetString(&Msg.name, pszName); 350 330 VbglHGCMParmPtrSet(&Msg.buffer, pvBuf, cbBuf); … … 544 524 { 545 525 EnumProperties Msg; 546 547 Msg.hdr.result = VERR_WRONG_ORDER; 548 Msg.hdr.u32ClientID = idClient; 549 Msg.hdr.u32Function = ENUM_PROPS; 550 Msg.hdr.cParms = 3; 526 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, ENUM_PROPS, 3); 527 551 528 /* Get the length of the patterns array... */ 552 529 size_t cchPatterns = 0; … … 814 791 815 792 DelProperty Msg; 816 817 Msg.hdr.result = VERR_WRONG_ORDER; 818 Msg.hdr.u32ClientID = idClient; 819 Msg.hdr.u32Function = DEL_PROP; 820 Msg.hdr.cParms = 1; 793 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, DEL_PROP, 1); 821 794 VbglHGCMParmPtrSetString(&Msg.name, pszName); 822 795 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 924 897 */ 925 898 GetNotification Msg; 926 927 Msg.hdr.u32Timeout = cMillies; 928 Msg.hdr.fInterruptible = true; 929 Msg.hdr.info.result = VERR_WRONG_ORDER; 930 Msg.hdr.info.u32ClientID = idClient; 931 Msg.hdr.info.u32Function = GET_NOTIFICATION; 932 Msg.hdr.info.cParms = 4; 899 VBGL_HGCM_HDR_INIT_TIMED(&Msg.hdr, idClient, GET_NOTIFICATION, 4, cMillies); 900 933 901 VbglHGCMParmPtrSetString(&Msg.patterns, pszPatterns); 934 902 Msg.buffer.SetPtr(pvBuf, cbBuf); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp
r62842 r68458 83 83 84 84 VBoxHostChannelAttach parms; 85 86 parms.hdr.result = VERR_WRONG_ORDER; 87 parms.hdr.u32ClientID = u32HGCMClientId; 88 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_ATTACH; 89 parms.hdr.cParms = 3; 90 85 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_ATTACH, 3); 91 86 VbglHGCMParmPtrSet(&parms.name, pszCopy, (uint32_t)cbName); 92 87 VbglHGCMParmUInt32Set(&parms.flags, u32Flags); … … 113 108 { 114 109 VBoxHostChannelDetach parms; 115 116 parms.hdr.result = VERR_WRONG_ORDER; 117 parms.hdr.u32ClientID = u32HGCMClientId; 118 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_DETACH; 119 parms.hdr.cParms = 1; 120 110 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_DETACH, 1); 121 111 VbglHGCMParmUInt32Set(&parms.handle, u32ChannelHandle); 122 112 … … 130 120 { 131 121 VBoxHostChannelSend parms; 132 133 parms.hdr.result = VERR_WRONG_ORDER; 134 parms.hdr.u32ClientID = u32HGCMClientId; 135 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_SEND; 136 parms.hdr.cParms = 2; 137 122 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_SEND, 2); 138 123 VbglHGCMParmUInt32Set(&parms.handle, u32ChannelHandle); 139 124 VbglHGCMParmPtrSet(&parms.data, pvData, cbData); … … 157 142 { 158 143 VBoxHostChannelRecv parms; 159 160 parms.hdr.result = VERR_WRONG_ORDER; 161 parms.hdr.u32ClientID = u32HGCMClientId; 162 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_RECV; 163 parms.hdr.cParms = 4; 164 144 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_RECV, 4); 165 145 VbglHGCMParmUInt32Set(&parms.handle, u32ChannelHandle); 166 146 VbglHGCMParmPtrSet(&parms.data, pvData, cbData); … … 194 174 { 195 175 VBoxHostChannelControl parms; 196 197 parms.hdr.result = VERR_WRONG_ORDER; 198 parms.hdr.u32ClientID = u32HGCMClientId; 199 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_CONTROL; 200 parms.hdr.cParms = 5; 201 176 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_CONTROL, 5); 202 177 VbglHGCMParmUInt32Set(&parms.handle, u32ChannelHandle); 203 178 VbglHGCMParmUInt32Set(&parms.code, u32Code); … … 229 204 { 230 205 VBoxHostChannelEventWait parms; 231 232 parms.hdr.result = VERR_WRONG_ORDER; 233 parms.hdr.u32ClientID = u32HGCMClientId; 234 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_EVENT_WAIT; 235 parms.hdr.cParms = 4; 236 206 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_EVENT_WAIT, 4); 237 207 VbglHGCMParmUInt32Set(&parms.handle, 0); 238 208 VbglHGCMParmUInt32Set(&parms.id, 0); … … 260 230 uint32_t u32HGCMClientId) 261 231 { 232 RT_NOREF1(u32ChannelHandle); 233 262 234 VBoxHostChannelEventCancel parms; 263 RT_NOREF1(u32ChannelHandle); 264 265 parms.hdr.result = VERR_WRONG_ORDER; 266 parms.hdr.u32ClientID = u32HGCMClientId; 267 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_EVENT_CANCEL; 268 parms.hdr.cParms = 0; 235 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_EVENT_CANCEL, 0); 269 236 270 237 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(parms)), &parms, sizeof(parms)); … … 298 265 299 266 VBoxHostChannelQuery parms; 300 301 parms.hdr.result = VERR_WRONG_ORDER; 302 parms.hdr.u32ClientID = u32HGCMClientId; 303 parms.hdr.u32Function = VBOX_HOST_CHANNEL_FN_QUERY; 304 parms.hdr.cParms = 5; 305 267 VBGL_HGCM_HDR_INIT(&parms.hdr, u32HGCMClientId, VBOX_HOST_CHANNEL_FN_QUERY, 5); 306 268 VbglHGCMParmPtrSet(&parms.name, pszCopy, (uint32_t)cbName); 307 269 VbglHGCMParmUInt32Set(&parms.code, u32Code); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp
r62521 r68458 144 144 145 145 VBoxSFQueryMappings Msg; 146 147 Msg.callInfo.result = VERR_WRONG_ORDER; 148 Msg.callInfo.u32ClientID = idClient; 149 Msg.callInfo.u32Function = SHFL_FN_QUERY_MAPPINGS; 150 Msg.callInfo.cParms = 3; 146 VBGL_HGCM_HDR_INIT(&Msg.callInfo, idClient, SHFL_FN_QUERY_MAPPINGS, 3); 151 147 152 148 /* Set the mapping flags. */ … … 237 233 238 234 VBoxSFQueryMapName Msg; 239 240 Msg.callInfo.result = VERR_WRONG_ORDER; 241 Msg.callInfo.u32ClientID = idClient; 242 Msg.callInfo.u32Function = SHFL_FN_QUERY_MAP_NAME; 243 Msg.callInfo.cParms = 2; 235 VBGL_HGCM_HDR_INIT(&Msg.callInfo, idClient, SHFL_FN_QUERY_MAP_NAME, 2); 244 236 245 237 int rc; -
trunk/src/VBox/Additions/x11/VBoxClient/check3d.cpp
r64114 r68458 30 30 { 31 31 int rc; 32 HGCMCLIENTID cClientID;32 HGCMCLIENTID idClient; 33 33 CRVBOXHGCMGETCAPS caps; 34 34 LogFlowFunc(("\n")); … … 40 40 if (RT_FAILURE(rc)) 41 41 exit(1); 42 rc = VbglR3HGCMConnect("VBoxSharedCrOpenGL", & cClientID);42 rc = VbglR3HGCMConnect("VBoxSharedCrOpenGL", &idClient); 43 43 if (RT_FAILURE(rc)) 44 44 exit(1); 45 caps.hdr.result = VERR_WRONG_ORDER;46 caps.hdr.u32ClientID = cClientID;47 caps.hdr.u32Function = SHCRGL_GUEST_FN_GET_CAPS_LEGACY;48 caps.hdr.cParms = SHCRGL_CPARMS_GET_CAPS_LEGACY;49 45 46 VBGL_HGCM_HDR_INIT(&caps.hdr, idClient, SHCRGL_GUEST_FN_GET_CAPS_LEGACY, SHCRGL_CPARMS_GET_CAPS_LEGACY); 50 47 caps.Caps.type = VMMDevHGCMParmType_32bit; 51 48 caps.Caps.u.value32 = 0; … … 56 53 if (caps.Caps.u.value32 & CR_VBOX_CAP_HOST_CAPS_NOT_SUFFICIENT) 57 54 exit(1); 58 VbglR3HGCMDisconnect( cClientID);55 VbglR3HGCMDisconnect(idClient); 59 56 VbglR3Term(); 60 57 LogFlowFunc(("returning %Rrc\n", rc)); -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r65381 r68458 757 757 CRVBOXHGCMINJECT parms; 758 758 759 parms.hdr.result = VERR_WRONG_ORDER; 760 parms.hdr.u32ClientID = conn->u32ClientID; 761 parms.hdr.u32Function = SHCRGL_GUEST_FN_INJECT; 762 parms.hdr.cParms = SHCRGL_CPARMS_INJECT; 759 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_INJECT, SHCRGL_CPARMS_INJECT); 763 760 764 761 parms.u32ClientID.type = VMMDevHGCMParmType_32bit; … … 777 774 CRVBOXHGCMWRITE parms; 778 775 779 parms.hdr.result = VERR_WRONG_ORDER; 780 parms.hdr.u32ClientID = conn->u32ClientID; 781 parms.hdr.u32Function = SHCRGL_GUEST_FN_WRITE; 782 parms.hdr.cParms = SHCRGL_CPARMS_WRITE; 776 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_WRITE, SHCRGL_CPARMS_WRITE); 783 777 784 778 parms.pBuffer.type = VMMDevHGCMParmType_LinAddr_In; … … 815 809 RT_NOREF(buf, len); 816 810 817 parms.hdr.result = VERR_WRONG_ORDER; 818 parms.hdr.u32ClientID = conn->u32ClientID; 819 parms.hdr.u32Function = SHCRGL_GUEST_FN_READ; 820 parms.hdr.cParms = SHCRGL_CPARMS_READ; 811 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_READ, SHCRGL_CPARMS_READ); 821 812 822 813 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ … … 858 849 int rc; 859 850 860 parms.hdr.result = VERR_WRONG_ORDER; 861 parms.hdr.u32ClientID = conn->u32ClientID; 862 parms.hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ; 863 parms.hdr.cParms = SHCRGL_CPARMS_WRITE_READ; 851 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_WRITE_READ, SHCRGL_CPARMS_WRITE_READ); 864 852 865 853 parms.pBuffer.type = VMMDevHGCMParmType_LinAddr_In; … … 883 871 CRVBOXHGCMWRITEBUFFER wbParms; 884 872 885 wbParms.hdr.result = VERR_WRONG_ORDER; 886 wbParms.hdr.u32ClientID = conn->u32ClientID; 887 wbParms.hdr.u32Function = SHCRGL_GUEST_FN_WRITE_BUFFER; 888 wbParms.hdr.cParms = SHCRGL_CPARMS_WRITE_BUFFER; 873 VBGL_HGCM_HDR_INIT(&wbParms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_WRITE_BUFFER, SHCRGL_CPARMS_WRITE_BUFFER); 889 874 890 875 wbParms.iBufferID.type = VMMDevHGCMParmType_32bit; … … 927 912 CRVBOXHGCMWRITEREADBUFFERED wrbParms; 928 913 929 wrbParms.hdr.result = VERR_WRONG_ORDER; 930 wrbParms.hdr.u32ClientID = conn->u32ClientID; 931 wrbParms.hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ_BUFFERED; 932 wrbParms.hdr.cParms = SHCRGL_CPARMS_WRITE_READ_BUFFERED; 914 VBGL_HGCM_HDR_INIT(&wrbParms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_WRITE_READ_BUFFERED, SHCRGL_CPARMS_WRITE_READ_BUFFERED); 933 915 934 916 crMemcpy(&wrbParms.iBufferID, &wbParms.iBufferID, sizeof(HGCMFunctionParameter)); … … 1060 1042 CRASSERT(!conn->pBuffer); 1061 1043 1062 parms.hdr.result = VERR_WRONG_ORDER; 1063 parms.hdr.u32ClientID = conn->u32ClientID; 1064 parms.hdr.u32Function = SHCRGL_GUEST_FN_READ; 1065 parms.hdr.cParms = SHCRGL_CPARMS_READ; 1044 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_READ, SHCRGL_CPARMS_READ); 1066 1045 1067 1046 parms.pBuffer.type = VMMDevHGCMParmType_LinAddr_Out; … … 1266 1245 RT_NOREF(vMajor, vMinor); 1267 1246 1268 parms.hdr.result = VERR_WRONG_ORDER; 1269 parms.hdr.u32ClientID = conn->u32ClientID; 1270 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_VERSION; 1271 parms.hdr.cParms = SHCRGL_CPARMS_SET_VERSION; 1247 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_SET_VERSION, SHCRGL_CPARMS_SET_VERSION); 1272 1248 1273 1249 parms.vMajor.type = VMMDevHGCMParmType_32bit; … … 1303 1279 int rc; 1304 1280 1305 caps.hdr.result = VERR_WRONG_ORDER; 1306 caps.hdr.u32ClientID = conn->u32ClientID; 1307 caps.hdr.u32Function = SHCRGL_GUEST_FN_GET_CAPS_LEGACY; 1308 caps.hdr.cParms = SHCRGL_CPARMS_GET_CAPS_LEGACY; 1281 VBGL_HGCM_HDR_INIT(&caps.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_GET_CAPS_LEGACY, SHCRGL_CPARMS_GET_CAPS_LEGACY); 1309 1282 1310 1283 caps.Caps.type = VMMDevHGCMParmType_32bit; … … 1338 1311 int rc; 1339 1312 1340 parms.hdr.result = VERR_WRONG_ORDER; 1341 parms.hdr.u32ClientID = conn->u32ClientID; 1342 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID; 1343 parms.hdr.cParms = SHCRGL_CPARMS_SET_PID; 1313 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_SET_PID, SHCRGL_CPARMS_SET_PID); 1344 1314 1345 1315 parms.u64PID.type = VMMDevHGCMParmType_64bit; -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c
r65381 r68458 1146 1146 int rc; 1147 1147 1148 parms.hdr.result = VERR_WRONG_ORDER; 1149 parms.hdr.u32ClientID = conn->u32ClientID; 1150 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_VERSION; 1151 parms.hdr.cParms = SHCRGL_CPARMS_SET_VERSION; 1148 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_SET_VERSION, SHCRGL_CPARMS_SET_VERSION); 1152 1149 1153 1150 parms.vMajor.type = VMMDevHGCMParmType_32bit; … … 1178 1175 int rc; 1179 1176 1180 parms.hdr.result = VERR_WRONG_ORDER; 1181 parms.hdr.u32ClientID = conn->u32ClientID; 1182 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID; 1183 parms.hdr.cParms = SHCRGL_CPARMS_SET_PID; 1177 VBGL_HGCM_HDR_INIT(&parms.hdr, conn->u32ClientID, SHCRGL_GUEST_FN_SET_PID, SHCRGL_CPARMS_SET_PID); 1184 1178 1185 1179 parms.u64PID.type = VMMDevHGCMParmType_64bit;
Note:
See TracChangeset
for help on using the changeset viewer.