VirtualBox

Changeset 100434 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 7, 2023 11:55:21 AM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Use ShClTransfer methods instead of calling the provider interface directly. ​​bugref:9437

File:
1 edited

Legend:

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

    r100204 r100434  
    186186    int rc;
    187187
    188     if (   m_hObj == NIL_SHCLOBJHANDLE
    189         && m_pTransfer->ProviderIface.pfnObjOpen)
     188    if (m_hObj == NIL_SHCLOBJHANDLE)
    190189    {
    191190        SHCLOBJOPENCREATEPARMS openParms;
     
    198197            rc = RTStrCopy(openParms.pszPath, openParms.cbPath, m_strPath.c_str());
    199198            if (RT_SUCCESS(rc))
    200             {
    201                 rc = m_pTransfer->ProviderIface.pfnObjOpen(&m_pTransfer->ProviderCtx, &openParms, &m_hObj);
    202             }
     199                rc = ShClTransferObjOpen(m_pTransfer, &openParms, &m_hObj);
    203200
    204201            ShClTransferObjOpenParmsDestroy(&openParms);
     
    217214        if (cbToRead)
    218215        {
    219             rc = m_pTransfer->ProviderIface.pfnObjRead(&m_pTransfer->ProviderCtx, m_hObj,
    220                                                        pvBuffer, cbToRead, 0 /* fFlags */, &cbRead);
     216            rc = ShClTransferObjRead(m_pTransfer, m_hObj, pvBuffer, cbToRead, 0 /* fFlags */, &cbRead);
    221217            if (RT_SUCCESS(rc))
    222218            {
     
    231227        if (m_fIsComplete)
    232228        {
    233             if (m_pTransfer->ProviderIface.pfnObjClose)
    234             {
    235                 int rc2 = m_pTransfer->ProviderIface.pfnObjClose(&m_pTransfer->ProviderCtx, m_hObj);
    236                 AssertRC(rc2);
    237             }
     229            rc = ShClTransferObjClose(m_pTransfer, m_hObj);
    238230
    239231            if (m_pParent)
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