Changeset 103631 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
- Timestamp:
- Mar 1, 2024 11:00:38 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
r103480 r103631 60 60 61 61 62 Sh aredClipboardWinStreamImpl::SharedClipboardWinStreamImpl(SharedClipboardWinDataObject *pParent, PSHCLTRANSFER pTransfer,63 62 ShClWinStreamImpl::ShClWinStreamImpl(ShClWinDataObject *pParent, PSHCLTRANSFER pTransfer, 63 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo) 64 64 : m_pParent(pParent) 65 65 , m_lRefCount(1) /* Our IDataObjct *always* holds the last reference to this object; needed for the callbacks. */ … … 81 81 } 82 82 83 Sh aredClipboardWinStreamImpl::~SharedClipboardWinStreamImpl(void)83 ShClWinStreamImpl::~ShClWinStreamImpl(void) 84 84 { 85 85 LogFlowThisFuncEnter(); … … 95 95 */ 96 96 97 STDMETHODIMP Sh aredClipboardWinStreamImpl::QueryInterface(REFIID iid, void **ppvObject)97 STDMETHODIMP ShClWinStreamImpl::QueryInterface(REFIID iid, void **ppvObject) 98 98 { 99 99 AssertPtrReturn(ppvObject, E_INVALIDARG); … … 124 124 } 125 125 126 STDMETHODIMP_(ULONG) Sh aredClipboardWinStreamImpl::AddRef(void)126 STDMETHODIMP_(ULONG) ShClWinStreamImpl::AddRef(void) 127 127 { 128 128 LONG lCount = InterlockedIncrement(&m_lRefCount); … … 131 131 } 132 132 133 STDMETHODIMP_(ULONG) Sh aredClipboardWinStreamImpl::Release(void)133 STDMETHODIMP_(ULONG) ShClWinStreamImpl::Release(void) 134 134 { 135 135 LONG lCount = InterlockedDecrement(&m_lRefCount); … … 148 148 */ 149 149 150 STDMETHODIMP Sh aredClipboardWinStreamImpl::Clone(IStream** ppStream)150 STDMETHODIMP ShClWinStreamImpl::Clone(IStream** ppStream) 151 151 { 152 152 RT_NOREF(ppStream); … … 156 156 } 157 157 158 STDMETHODIMP Sh aredClipboardWinStreamImpl::Commit(DWORD dwFrags)158 STDMETHODIMP ShClWinStreamImpl::Commit(DWORD dwFrags) 159 159 { 160 160 RT_NOREF(dwFrags); … … 164 164 } 165 165 166 STDMETHODIMP Sh aredClipboardWinStreamImpl::CopyTo(IStream *pDestStream, ULARGE_INTEGER nBytesToCopy, ULARGE_INTEGER *nBytesRead,166 STDMETHODIMP ShClWinStreamImpl::CopyTo(IStream *pDestStream, ULARGE_INTEGER nBytesToCopy, ULARGE_INTEGER *nBytesRead, 167 167 ULARGE_INTEGER *nBytesWritten) 168 168 { … … 173 173 } 174 174 175 STDMETHODIMP Sh aredClipboardWinStreamImpl::LockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes,DWORD dwFlags)175 STDMETHODIMP ShClWinStreamImpl::LockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes,DWORD dwFlags) 176 176 { 177 177 RT_NOREF(nStart, nBytes, dwFlags); … … 182 182 183 183 /* Note: Windows seems to assume EOF if nBytesRead < nBytesToRead. */ 184 STDMETHODIMP Sh aredClipboardWinStreamImpl::Read(void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead)184 STDMETHODIMP ShClWinStreamImpl::Read(void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead) 185 185 { 186 186 LogFlowThisFunc(("Enter: m_cbProcessed=%RU64\n", m_cbProcessed)); … … 249 249 250 250 if (m_pParent) 251 m_pParent->SetStatus(Sh aredClipboardWinDataObject::Completed);251 m_pParent->SetStatus(ShClWinDataObject::Completed); 252 252 } 253 253 } … … 256 256 { 257 257 if (m_pParent) 258 m_pParent->SetStatus(Sh aredClipboardWinDataObject::Error, rc /* Propagate rc */);258 m_pParent->SetStatus(ShClWinDataObject::Error, rc /* Propagate rc */); 259 259 } 260 260 … … 271 271 } 272 272 273 STDMETHODIMP Sh aredClipboardWinStreamImpl::Revert(void)274 { 275 LogFlowThisFuncEnter(); 276 return E_NOTIMPL; 277 } 278 279 STDMETHODIMP Sh aredClipboardWinStreamImpl::Seek(LARGE_INTEGER nMove, DWORD dwOrigin, ULARGE_INTEGER* nNewPos)273 STDMETHODIMP ShClWinStreamImpl::Revert(void) 274 { 275 LogFlowThisFuncEnter(); 276 return E_NOTIMPL; 277 } 278 279 STDMETHODIMP ShClWinStreamImpl::Seek(LARGE_INTEGER nMove, DWORD dwOrigin, ULARGE_INTEGER* nNewPos) 280 280 { 281 281 RT_NOREF(nMove, dwOrigin, nNewPos); … … 286 286 } 287 287 288 STDMETHODIMP Sh aredClipboardWinStreamImpl::SetSize(ULARGE_INTEGER nNewSize)288 STDMETHODIMP ShClWinStreamImpl::SetSize(ULARGE_INTEGER nNewSize) 289 289 { 290 290 RT_NOREF(nNewSize); … … 294 294 } 295 295 296 STDMETHODIMP Sh aredClipboardWinStreamImpl::Stat(STATSTG *pStatStg, DWORD dwFlags)296 STDMETHODIMP ShClWinStreamImpl::Stat(STATSTG *pStatStg, DWORD dwFlags) 297 297 { 298 298 HRESULT hr = S_OK; … … 355 355 } 356 356 357 STDMETHODIMP Sh aredClipboardWinStreamImpl::UnlockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes, DWORD dwFlags)357 STDMETHODIMP ShClWinStreamImpl::UnlockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes, DWORD dwFlags) 358 358 { 359 359 RT_NOREF(nStart, nBytes, dwFlags); … … 363 363 } 364 364 365 STDMETHODIMP Sh aredClipboardWinStreamImpl::Write(const void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead)365 STDMETHODIMP ShClWinStreamImpl::Write(const void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead) 366 366 { 367 367 RT_NOREF(pvBuffer, nBytesToRead, nBytesRead); … … 386 386 */ 387 387 /* static */ 388 HRESULT Sh aredClipboardWinStreamImpl::Create(SharedClipboardWinDataObject *pParent, PSHCLTRANSFER pTransfer,388 HRESULT ShClWinStreamImpl::Create(ShClWinDataObject *pParent, PSHCLTRANSFER pTransfer, 389 389 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo, 390 390 IStream **ppStream) … … 392 392 AssertPtrReturn(pTransfer, E_POINTER); 393 393 394 Sh aredClipboardWinStreamImpl *pStream = new SharedClipboardWinStreamImpl(pParent, pTransfer, strPath, pObjInfo);394 ShClWinStreamImpl *pStream = new ShClWinStreamImpl(pParent, pTransfer, strPath, pObjInfo); 395 395 if (pStream) 396 396 {
Note:
See TracChangeset
for help on using the changeset viewer.