Changeset 75737 in vbox for trunk/src/VBox/HostServices/GuestControl
- Timestamp:
- Nov 26, 2018 3:44:41 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126937
- Location:
- trunk/src/VBox/HostServices/GuestControl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r75500 r75737 224 224 * assign the context ID to the command. 225 225 */ 226 rc = mpParms[0].getUInt32(&mContextID);226 rc = HGCMSvcGetU32(&mpParms[0], &mContextID); 227 227 228 228 /* Set timestamp so that clients can distinguish between already … … 418 418 if (pConnection->mNumParms >= 2) 419 419 { 420 pConnection->mParms[0].setUInt32(mMsgType); /* Message ID */421 pConnection->mParms[1].setUInt32(mParmCount); /* Required parameters for message */420 HGCMSvcSetU32(&pConnection->mParms[0], mMsgType); /* Message ID */ 421 HGCMSvcSetU32(&pConnection->mParms[1], mParmCount); /* Required parameters for message */ 422 422 } 423 423 else … … 777 777 && mPendingCon.mNumParms >= 2) 778 778 { 779 mPendingCon.mParms[0].setUInt32(HOST_CANCEL_PENDING_WAITS); /* Message ID. */780 mPendingCon.mParms[1].setUInt32(0); /* Required parameters for message. */779 HGCMSvcSetU32(&mPendingCon.mParms[0], HOST_CANCEL_PENDING_WAITS); /* Message ID. */ 780 HGCMSvcSetU32(&mPendingCon.mParms[1], 0); /* Required parameters for message. */ 781 781 782 782 AssertPtr(mSvcHelpers); … … 1109 1109 uint32_t cParms = 0; 1110 1110 VBOXHGCMSVCPARM arParms[2]; 1111 arParms[cParms++].setUInt32(pCurCmd->mContextID);1111 HGCMSvcSetU32(&arParms[cParms++], pCurCmd->mContextID); 1112 1112 1113 1113 int rc2 = hostCallback(GUEST_DISCONNECTED, cParms, arParms); … … 1207 1207 1208 1208 uint32_t uValue; 1209 int rc = paParms[0].getUInt32(&uValue);1209 int rc = HGCMSvcGetU32(&paParms[0], &uValue); 1210 1210 if (RT_SUCCESS(rc)) 1211 1211 { 1212 1212 uint32_t uMaskAdd; 1213 rc = paParms[1].getUInt32(&uMaskAdd);1213 rc = HGCMSvcGetU32(&paParms[1], &uMaskAdd); 1214 1214 if (RT_SUCCESS(rc)) 1215 1215 { 1216 1216 uint32_t uMaskRemove; 1217 rc = paParms[2].getUInt32(&uMaskRemove);1217 rc = HGCMSvcGetU32(&paParms[2], &uMaskRemove); 1218 1218 /** @todo paParm[3] (flags) not used yet. */ 1219 1219 if (RT_SUCCESS(rc)) … … 1584 1584 1585 1585 uint32_t uContextID, uFlags; 1586 int rc = paParms[0].getUInt32(&uContextID);1586 int rc = HGCMSvcGetU32(&paParms[0], &uContextID); 1587 1587 if (RT_SUCCESS(rc)) 1588 rc = paParms[1].getUInt32(&uFlags);1588 rc = HGCMSvcGetU32(&paParms[1], &uFlags); 1589 1589 1590 1590 uint32_t uSessionID = VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(uContextID); -
trunk/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp
r75500 r75737 152 152 153 153 VBOXHGCMSVCPARM aParms[1]; 154 aParms[0].setUInt32(1000 /* Context ID */);154 HGCMSvcSetU32(&aParms[0], 1000 /* Context ID */); 155 155 156 156 CMDHOST aCmdHostAll[] = … … 208 208 /* No commands from host yet. */ 209 209 VBOXHGCMSVCPARM aParmsGuest[8]; 210 aParmsGuest[0].setUInt32(0 /* Msg type */);211 aParmsGuest[1].setUInt32(0 /* Parameters */);210 HGCMSvcSetU32(&aParmsGuest[0], 0 /* Msg type */); 211 HGCMSvcSetU32(&aParmsGuest[1], 0 /* Parameters */); 212 212 pTable->pfnCall(pTable->pvService, &callHandle, 1 /* Client ID */, NULL /* pvClient */, 213 213 GUEST_MSG_WAIT, 2, &aParmsGuest[0], 0); … … 216 216 /* Host: Add a dummy command. */ 217 217 VBOXHGCMSVCPARM aParmsHost[8]; 218 aParmsHost[0].setUInt32(1000 /* Context ID */);219 aParmsHost[1].setString("foo.bar");220 aParmsHost[2].setString("baz");218 HGCMSvcSetU32(&aParmsHost[0], 1000 /* Context ID */); 219 HGCMSvcSetStr(&aParmsHost[1], "foo.bar"); 220 HGCMSvcSetStr(&aParmsHost[2], "baz"); 221 221 222 222 rc = pTable->pfnHostCall(pTable->pvService, HOST_EXEC_CMD, 3, &aParmsHost[0]);
Note:
See TracChangeset
for help on using the changeset viewer.