Changeset 79174 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jun 17, 2019 10:30:49 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp
r79120 r79174 199 199 Msg.enmChecksumType.GetUInt32((uint32_t *)&pDataHdr->enmChecksumType); 200 200 Msg.cbChecksum.GetUInt32(&pDataHdr->cbChecksum); 201 202 AssertReturn(SharedClipboardURIDataHdrIsValid(pDataHdr), VERR_INVALID_PARAMETER); 201 203 } 202 204 … … 208 210 * Sends a guest clipboard data header to the host. 209 211 * 210 * This is usually called in reply to a VBOX_SHARED_CLIPBOARD_HOST_ MSG_WRITE_DATA_HDR message211 * from the host.212 * This is usually called in reply to a VBOX_SHARED_CLIPBOARD_HOST_READ_DATA message from the host 213 * (if URI format is specified). 212 214 * 213 215 * @returns VBox status code. … … 218 220 { 219 221 VBoxClipboardWriteDataHdrMsg Msg; 222 RT_ZERO(Msg); 223 220 224 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_GUEST_FN_WRITE_DATA_HDR, VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_DATA_HDR); 225 226 AssertReturn(SharedClipboardURIDataHdrIsValid(pDataHdr), VERR_INVALID_PARAMETER); 221 227 222 228 Msg.uContext.SetUInt32(0); /** @todo Not used yet. */ 223 229 Msg.uFlags.SetUInt32(pDataHdr->uFlags); /** @todo Not used yet. */ 224 Msg.uScreenId.SetUInt32(pDataHdr->uScreenId); /** @todo Not used for guest->host (yet). */230 Msg.uScreenId.SetUInt32(pDataHdr->uScreenId); /** @todo Not used yet. */ 225 231 Msg.cbTotal.SetUInt64(pDataHdr->cbTotal); 226 232 Msg.cbMeta.SetUInt32(pDataHdr->cbMeta); 227 Msg. cbMetaFmt.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt);233 Msg.pvMetaFmt.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt); 228 234 Msg.cbMetaFmt.SetUInt32(pDataHdr->cbMetaFmt); 229 235 Msg.cObjects.SetUInt64(pDataHdr->cObjects); 230 236 Msg.enmCompression.SetUInt32(pDataHdr->enmCompression); /** @todo Not used yet. */ 231 Msg.enmChecksumType.SetUInt32(pDataHdr->enmChecksumType); /** @todo Not used yet. */ 232 Msg.cbChecksum.SetPtr(pDataHdr->pvChecksum, pDataHdr->cbChecksum); /** @todo Not used yet. */ 233 Msg.cbChecksum.SetUInt32(pDataHdr->cbChecksum); /** @todo Not used yet. */ 234 235 return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 237 Msg.enmChecksumType.SetUInt32(RTDIGESTTYPE_INVALID); /** @todo Not used yet. */ 238 Msg.pvChecksum.SetPtr(NULL, 0); /** @todo Not used yet. */ 239 Msg.cbChecksum.SetUInt32(0); /** @todo Not used yet. */ 240 241 int rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 242 243 LogFlowFunc(("cbTotal=%RU64, cbMeta=%RU32, pvMetaFmt=%p (%RU32), cObjects=%RU64, rc=%Rrc\n", 244 pDataHdr->cbTotal, pDataHdr->cbMeta, pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt, pDataHdr->cObjects, rc)); 245 246 LogFlowFuncLeaveRC(rc); 247 return rc; 236 248 } 237 249 … … 789 801 VBGLR3DECL(int) VbglR3ClipboardReportFormats(HGCMCLIENTID idClient, uint32_t fFormats) 790 802 { 791 VBoxClipboard WriteFormatsMsg Msg;792 793 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_GUEST_FN_REPORT_FORMATS, VBOX_SHARED_CLIPBOARD_CPARMS_ FORMATS);803 VBoxClipboardReportFormatsMsg Msg; 804 805 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_GUEST_FN_REPORT_FORMATS, VBOX_SHARED_CLIPBOARD_CPARMS_REPORT_FORMATS); 794 806 VbglHGCMParmUInt32Set(&Msg.formats, fFormats); 795 807
Note:
See TracChangeset
for help on using the changeset viewer.