VirtualBox

Changeset 100433 in vbox


Ignore:
Timestamp:
Jul 7, 2023 10:36:55 AM (19 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Also use the Windows-specific transfer context data in VBoxTray. ​​bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r100429 r100433  
    9393*********************************************************************************************************************************/
    9494#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
     95static DECLCALLBACK(void) vbtrShClTransferCreatedCallback(PSHCLTRANSFERCALLBACKCTX pCbCtx);
     96static DECLCALLBACK(void) vbtrShClTransferDestroyCallback(PSHCLTRANSFERCALLBACKCTX pCbCtx);
    9597static DECLCALLBACK(void) vbtrShClTransferInitializedCallback(PSHCLTRANSFERCALLBACKCTX pCbCtx);
    9698static DECLCALLBACK(void) vbtrShClTransferStartedCallback(PSHCLTRANSFERCALLBACKCTX pCbCtx);
     
    185187    LogFlowFuncLeaveRC(rc);
    186188    return rc;
     189}
     190
     191/**
     192 * @copydoc SHCLTRANSFERCALLBACKS::pfnOnCreated
     193 *
     194 * Called by ShClTransferCreate via VbglR3.
     195 *
     196 * @thread  Clipboard main thread.
     197 */
     198static DECLCALLBACK(void) vbtrShClTransferCreatedCallback(PSHCLTRANSFERCALLBACKCTX pCbCtx)
     199{
     200    LogFlowFuncEnter();
     201
     202    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pCbCtx->pvUser;
     203    AssertPtr(pCtx);
     204
     205    int rc = SharedClipboardWinTransferCreate(&pCtx->Win, pCbCtx->pTransfer);
     206
     207    LogFlowFuncLeaveRC(rc);
     208}
     209
     210/**
     211 * @copydoc SHCLTRANSFERCALLBACKS::pfnOnDestroy
     212 *
     213 * Called by ShClTransferDestroy via VbglR3.
     214 *
     215 * @thread  Clipboard main thread.
     216 */
     217static DECLCALLBACK(void) vbtrShClTransferDestroyCallback(PSHCLTRANSFERCALLBACKCTX pCbCtx)
     218{
     219    LogFlowFuncEnter();
     220
     221    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pCbCtx->pvUser;
     222    AssertPtr(pCtx);
     223
     224    SharedClipboardWinTransferDestroy(&pCtx->Win, pCbCtx->pTransfer);
     225
     226    LogFlowFuncLeave();
    187227}
    188228
     
    10941134    pCtx->CmdCtx.Transfers.Callbacks.cbUser = sizeof(SHCLCONTEXT);
    10951135
     1136    pCtx->CmdCtx.Transfers.Callbacks.pfnOnCreated     = vbtrShClTransferCreatedCallback;
     1137    pCtx->CmdCtx.Transfers.Callbacks.pfnOnDestroy     = vbtrShClTransferDestroyCallback;
    10961138    pCtx->CmdCtx.Transfers.Callbacks.pfnOnInitialized = vbtrShClTransferInitializedCallback;
    10971139    pCtx->CmdCtx.Transfers.Callbacks.pfnOnStarted     = vbtrShClTransferStartedCallback;
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