VirtualBox

Ignore:
Timestamp:
Aug 21, 2019 8:37:54 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Update.

File:
1 edited

Legend:

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

    r80283 r80359  
    187187            && m_pURITransfer->ProviderIface.pfnObjOpen)
    188188        {
    189             VBOXCLIPBOARDOBJOPENCREATEPARMS createParms;
    190             RT_ZERO(createParms);
    191 
    192             createParms.pszPath = RTStrDup(m_strPath.c_str());
    193             if (createParms.pszPath)
     189            VBOXCLIPBOARDOBJOPENCREATEPARMS openParms;
     190            rc = SharedClipboardURIObjectOpenParmsInit(&openParms);
     191            if (RT_SUCCESS(rc))
    194192            {
    195                 rc = m_pURITransfer->ProviderIface.pfnObjOpen(&m_pURITransfer->ProviderCtx, &createParms, &m_hObj);
    196 
    197                 RTStrFree(createParms.pszPath);
     193                openParms.fCreate = SHAREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS
     194                                  | SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW
     195                                  | SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ
     196                                  | SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE;
     197
     198                rc = RTStrCopy(openParms.pszPath, openParms.cbPath, m_strPath.c_str());
     199                if (RT_SUCCESS(rc))
     200                {
     201                    rc = m_pURITransfer->ProviderIface.pfnObjOpen(&m_pURITransfer->ProviderCtx, &openParms, &m_hObj);
     202                }
     203
     204                SharedClipboardURIObjectOpenParmsDestroy(&openParms);
    198205            }
    199             else
    200                 rc = VERR_NO_MEMORY;
    201206        }
    202207        else
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