VirtualBox

Changeset 80623 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Sep 6, 2019 10:05:11 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Removed old protocol handling cruft on the host side and added message translation support for serving older Guest Additions. Updated docs / protocol changelog.

Location:
trunk/src/VBox/Additions/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp

    r80450 r80623  
    168168                           VBOX_SHARED_CLIPBOARD_GUEST_FN_MSG_GET, 3);
    169169
    170         Msg.uContext.SetUInt32(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_WRITE);
     170        Msg.uContext.SetUInt32(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT);
    171171        Msg.uFormats.SetUInt32(0);
    172172        Msg.fFlags.SetUInt32(0);
     
    14771477        switch (uMsg)
    14781478        {
    1479             case VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_WRITE:
     1479            case VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT:
    14801480            {
    14811481                rc = VbglR3ClipboardFormatsWriteRecv(&pEvent->cmdCtx, &pEvent->u.ReportFormats);
     
    16491649    if (pCtx->uProtocolVer == 0)
    16501650    {
    1651         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_WRITE, 1);
     1651        VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_REPORT, 1);
    16521652        VbglHGCMParmUInt32Set(&Msg.uFormats, pFormats->uFormats);
    16531653    }
    16541654    else
    16551655    {
    1656         VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_WRITE, 3);
     1656        VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_REPORT, 3);
    16571657
    16581658        Msg.uContext.SetUInt32(pCtx->uContextID);
     
    16801680    VBoxClipboardFormatsMsg Msg;
    16811681
    1682     VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_WRITE, 1);
     1682    VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_REPORT, 1);
    16831683    VbglHGCMParmUInt32Set(&Msg.uFormats, fFormats);
    16841684
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceClipboard-os2.cpp

    r80444 r80623  
    775775         * Listener message - the host has new formats to offer.
    776776         */
    777         case WM_USER + VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_WRITE:
     777        case WM_USER + VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT:
    778778            vgsvcClipboardOs2AdvertiseHostFormats(LONGFROMMP(mp1));
    779779            break;
     
    895895                         * respond do WM_RENDERFORMAT message.
    896896                         */
    897                         case VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_WRITE:
    898                             if (!WinPostMsg(g_hwndWorker, WM_USER + VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_WRITE,
     897                        case VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT:
     898                            if (!WinPostMsg(g_hwndWorker, WM_USER + VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT,
    899899                                            MPFROMLONG(fFormats), 0))
    900900                                VGSvcError("WinPostMsg(%lx, FORMATS,,) failed, lasterr=%#lx\n",
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette