Changeset 78974 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
- Timestamp:
- Jun 4, 2019 4:51:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
r78897 r78974 45 45 #define VBOX_CLIPBOARD_WITH_UNICODE_SUPPORT 1 46 46 47 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject( SharedClipboardProvider *pProvider,47 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSHAREDCLIPBOARDURITRANSFER pTransfer, 48 48 LPFORMATETC pFormatEtc, LPSTGMEDIUM pStgMed, ULONG cFormats) 49 49 : m_enmStatus(Uninitialized) 50 50 , m_lRefCount(0) 51 51 , m_cFormats(0) 52 , m_p Provider(pProvider)52 , m_pTransfer(pTransfer) 53 53 , m_pStream(NULL) 54 54 , m_uObjIdx(0) 55 55 { 56 AssertPtr( pProvider);56 AssertPtr(m_pTransfer); 57 57 58 58 HRESULT hr; … … 121 121 m_enmStatus = Initialized; 122 122 123 m_pProvider->AddRef(); 123 AssertPtr(m_pTransfer->pProvider); 124 m_pTransfer->pProvider->AddRef(); 124 125 } 125 126 … … 129 130 VBoxClipboardWinDataObject::~VBoxClipboardWinDataObject(void) 130 131 { 131 if (m_p Provider)132 m_p Provider->Release();132 if (m_pTransfer->pProvider) 133 m_pTransfer->pProvider->Release(); 133 134 134 135 if (m_pStream) … … 394 395 LogFlowFunc(("FormatIndex_FileDescriptor%s\n", fUnicode ? "W" : "A")); 395 396 396 int rc = m_p Provider->ReadMetaData(); /** @todo Do this asynchronously some time earlier? */397 int rc = m_pTransfer->pProvider->ReadMetaData(); /** @todo Do this asynchronously some time earlier? */ 397 398 if ( RT_SUCCESS(rc) 398 && !m_p Provider->GetURIList().IsEmpty())399 && !m_pTransfer->pProvider->GetURIList().IsEmpty()) 399 400 { 400 401 HGLOBAL hGlobal; 401 rc = createFileGroupDescriptorFromURIList(m_p Provider->GetURIList(), fUnicode, &hGlobal);402 rc = createFileGroupDescriptorFromURIList(m_pTransfer->pProvider->GetURIList(), fUnicode, &hGlobal); 402 403 if (RT_SUCCESS(rc)) 403 404 { … … 416 417 LogFlowFunc(("FormatIndex_FileContents: m_uObjIdx=%u\n", m_uObjIdx)); 417 418 418 SharedClipboardURIObject *pURIObj = m_p Provider->GetURIList().At(m_uObjIdx);419 SharedClipboardURIObject *pURIObj = m_pTransfer->pProvider->GetURIList().At(m_uObjIdx); 419 420 if (pURIObj) 420 421 { 421 422 /* Hand-in the provider so that our IStream implementation can continue working with it. */ 422 hr = VBoxClipboardWinStreamImpl::Create( m_pProvider, pURIObj, &m_pStream);423 hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer, pURIObj, &m_pStream); 423 424 if (SUCCEEDED(hr)) 424 425 { … … 578 579 LogFlowFuncLeaveRC(VINF_SUCCESS); 579 580 return VINF_SUCCESS; 581 } 582 583 void VBoxClipboardWinDataObject::OnTransferComplete(int rc /* = VINF_SUCESS */) 584 { 585 RT_NOREF(rc); 586 587 LogFlowFuncLeaveRC(rc); 588 } 589 590 void VBoxClipboardWinDataObject::OnTransferCanceled(void) 591 { 592 LogFlowFuncLeave(); 580 593 } 581 594
Note:
See TracChangeset
for help on using the changeset viewer.