Changeset 28086 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Apr 8, 2010 12:32:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r28029 r28086 109 109 VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms) 110 110 { 111 AssertPtr(puMsg); 112 AssertPtr(puNumParms); 113 111 114 VBoxGuestCtrlHGCMMsgType Msg; 112 115 … … 122 125 if (RT_SUCCESS(rc)) 123 126 { 124 rc = Msg.hdr.result;127 rc = VbglHGCMParmUInt32Get(&Msg.msg, puMsg); 125 128 if (RT_SUCCESS(rc)) 126 { 127 rc = VbglHGCMParmUInt32Get(&Msg.msg, puMsg); 129 rc = VbglHGCMParmUInt32Get(&Msg.num_parms, puNumParms); 128 130 if (RT_SUCCESS(rc)) 129 rc = VbglHGCMParmUInt32Get(&Msg.num_parms, puNumParms); 130 /* Ok, so now we know what message type and how much parameters there are. */ 131 } 131 rc = Msg.hdr.result; 132 /* Ok, so now we know what message type and how much parameters there are. */ 132 133 } 133 134 return rc; … … 176 177 Msg.hdr.result = VERR_WRONG_ORDER; 177 178 Msg.hdr.u32ClientID = u32ClientId; 178 Msg.hdr.u32Function = GUEST_GET_HOST_MSG _DATA; /* Tell the host we want the actual data of a command. */179 Msg.hdr.u32Function = GUEST_GET_HOST_MSG; 179 180 Msg.hdr.cParms = uNumParms; 180 181 … … 196 197 if (RT_SUCCESS(rc)) 197 198 { 198 rc = Msg.hdr.result; 199 200 Msg.flags.GetUInt32(puFlags); 201 Msg.num_args.GetUInt32(puNumArgs); 202 Msg.num_env.GetUInt32(puNumEnvVars); 203 Msg.cb_env.GetUInt32(pcbEnv); 204 Msg.timeout.GetUInt32(puTimeLimit); 199 int rc2 = Msg.hdr.result; 200 if (RT_FAILURE(rc2)) 201 { 202 rc = rc2; 203 } 204 else 205 { 206 Msg.flags.GetUInt32(puFlags); 207 Msg.num_args.GetUInt32(puNumArgs); 208 Msg.num_env.GetUInt32(puNumEnvVars); 209 Msg.cb_env.GetUInt32(pcbEnv); 210 Msg.timeout.GetUInt32(puTimeLimit); 211 } 205 212 } 206 213 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.