VirtualBox

Changeset 100432 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 7, 2023 10:27:52 AM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Added missing SharedClipboardWinTransferCreate() function and use it in shClSvcWinTransferOnCreatedCallback(). ​​bugref:9437

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp

    r100428 r100432  
    11271127
    11281128/**
    1129  * Destroys implementation-specific data for an Shared Clipboard transfer.
    1130  *
     1129 * Creates implementation-specific data for a Windows Shared Clipboard transfer.
     1130 *
     1131 * @returns VBox status code.
    11311132 * @param   pWinCtx             Windows context to use.
    11321133 * @param   pTransfer           Shared Clipboard transfer to create implementation-specific data for.
     1134 */
     1135int SharedClipboardWinTransferCreate(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
     1136{
     1137    RT_NOREF(pWinCtx);
     1138
     1139    AssertMsgReturn(   pTransfer->pvUser == NULL
     1140                    && pTransfer->cbUser == 0, ("Already initialized Windows-specific data\n"), VERR_WRONG_ORDER);
     1141
     1142    pTransfer->pvUser = new SharedClipboardWinTransferCtx();  /** @todo Can this throw? */
     1143    AssertPtrReturn(pTransfer->pvUser, VERR_INVALID_POINTER);
     1144    pTransfer->cbUser = sizeof(SharedClipboardWinTransferCtx);
     1145
     1146    return VINF_SUCCESS;
     1147}
     1148
     1149/**
     1150 * Destroys implementation-specific data for a Windows Shared Clipboard transfer.
     1151 *
     1152 * @returns VBox status code.
     1153 * @param   pWinCtx             Windows context to use.
     1154 * @param   pTransfer           Shared Clipboard transfer to destroy implementation-specific data for.
    11331155 */
    11341156void SharedClipboardWinTransferDestroy(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r100412 r100432  
    286286
    287287    if (RT_SUCCESS(rc))
     288    {
    288289        rc = ShClTransferSetProvider(pTransfer, &pClient->Transfers.Provider); RT_NOREF(rc);
     290        if (RT_SUCCESS(rc))
     291            rc = SharedClipboardWinTransferCreate(&pCtx->Win, pTransfer);
     292    }
    289293
    290294    LogFlowFuncLeaveRC(rc);
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