Changeset 28402 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Apr 16, 2010 10:13:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r28286 r28402 107 107 * in a second call to the host. 108 108 */ 109 VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms )109 VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms, uint32_t u32Timeout) 110 110 { 111 111 AssertPtr(puMsg); … … 114 114 VBoxGuestCtrlHGCMMsgType Msg; 115 115 116 Msg.hdr.result = VERR_WRONG_ORDER; 117 Msg.hdr.u32ClientID = u32ClientId; 118 Msg.hdr.u32Function = GUEST_GET_HOST_MSG; /* Tell the host we want our next command. */ 119 Msg.hdr.cParms = 2; /* Just peek for the next message! */ 116 Msg.hdr.u32Timeout = u32Timeout; 117 Msg.hdr.fInterruptible = true; 118 119 Msg.hdr.info.result = VERR_WRONG_ORDER; 120 Msg.hdr.info.u32ClientID = u32ClientId; 121 Msg.hdr.info.u32Function = GUEST_GET_HOST_MSG; /* Tell the host we want our next command. */ 122 Msg.hdr.info.cParms = 2; /* Just peek for the next message! */ 120 123 121 124 VbglHGCMParmUInt32Set(&Msg.msg, 0); 122 125 VbglHGCMParmUInt32Set(&Msg.num_parms, 0); 123 126 124 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL (sizeof(Msg)), &Msg, sizeof(Msg));127 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL_TIMED(sizeof(Msg)), &Msg, sizeof(Msg)); 125 128 if (RT_SUCCESS(rc)) 126 129 { … … 129 132 rc = VbglHGCMParmUInt32Get(&Msg.num_parms, puNumParms); 130 133 if (RT_SUCCESS(rc)) 131 rc = Msg.hdr. result;134 rc = Msg.hdr.info.result; 132 135 /* Ok, so now we know what message type and how much parameters there are. */ 133 136 }
Note:
See TracChangeset
for help on using the changeset viewer.