Changeset 86869 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Nov 12, 2020 7:59:52 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 141323
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibDragAndDrop.cpp
r85746 r86869 61 61 * 62 62 * @returns IPRT status code. 63 * Will return VERR_CANCELLED (implemented by the host service) if we need to bail out. 63 64 * @param pCtx DnD context to use. 64 65 * @param puMsg Where to store the message type. … … 72 73 AssertPtrReturn(pcParms, VERR_INVALID_POINTER); 73 74 74 HGCMMsgGetNext Msg; 75 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_FN_GET_NEXT_HOST_MSG, 3); 76 Msg.uMsg.SetUInt32(0); 77 Msg.cParms.SetUInt32(0); 78 Msg.fBlock.SetUInt32(fWait ? 1 : 0); 79 80 int rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 81 if (RT_SUCCESS(rc)) 82 { 83 rc = Msg.uMsg.GetUInt32(puMsg); AssertRC(rc); 84 rc = Msg.cParms.GetUInt32(pcParms); AssertRC(rc); 85 } 75 int rc; 76 77 do 78 { 79 HGCMMsgGetNext Msg; 80 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_FN_GET_NEXT_HOST_MSG, 3); 81 Msg.uMsg.SetUInt32(0); 82 Msg.cParms.SetUInt32(0); 83 Msg.fBlock.SetUInt32(fWait ? 1 : 0); 84 85 rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 86 if (RT_SUCCESS(rc)) 87 { 88 rc = Msg.uMsg.GetUInt32(puMsg); AssertRC(rc); 89 rc = Msg.cParms.GetUInt32(pcParms); AssertRC(rc); 90 } 91 92 } while (rc == VERR_INTERRUPTED); 86 93 87 94 return rc; … … 1078 1085 { 1079 1086 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 1087 1088 if (!pCtx->uClientID) /* Already disconnected? Bail out early. */ 1089 return VINF_SUCCESS; 1090 1080 1091 int rc = VbglR3HGCMDisconnect(pCtx->uClientID); 1081 1092 if (RT_SUCCESS(rc)) 1082 1093 pCtx->uClientID = 0; 1094 1083 1095 return rc; 1084 1096 } … … 1162 1174 rc = VbglR3DnDConnect(pCtx); 1163 1175 } 1176 } 1177 1178 if (rc == VERR_CANCELLED) /* Host service told us that we have to bail out. */ 1179 { 1180 pEvent->enmType = VBGLR3DNDEVENTTYPE_QUIT; 1181 1182 *ppEvent = pEvent; 1183 1184 return VINF_SUCCESS; 1164 1185 } 1165 1186
Note:
See TracChangeset
for help on using the changeset viewer.