Changeset 79630 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
- Timestamp:
- Jul 9, 2019 8:14:01 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
r79497 r79630 249 249 if (RT_SUCCESS(rc)) 250 250 { 251 VBOXCLIPBOARDLIST HDR Hdr;252 rc = SharedClipboardURIList HdrInit(&Hdr);251 VBOXCLIPBOARDLISTOPENPARMS openParmsList; 252 rc = SharedClipboardURIListOpenParmsInit(&openParmsList); 253 253 if (RT_SUCCESS(rc)) 254 254 { 255 VBOXCLIPBOARDLISTHANDLE hList;256 rc = SharedClipboardURITransferListOpen(pTransfer, & Hdr, &hList);255 SHAREDCLIPBOARDLISTHANDLE hList; 256 rc = SharedClipboardURITransferListOpen(pTransfer, &openParmsList, &hList); 257 257 if (RT_SUCCESS(rc)) 258 258 { 259 LogFlowFunc(("hList=%RU64, cTotalObjects=%RU64, cbTotalSize=%RU64\n\n", 260 hList, Hdr.cTotalObjects, Hdr.cbTotalSize)); 261 262 for (uint64_t i = 0; i < Hdr.cTotalObjects; i++) 259 LogFlowFunc(("hList=%RU64\n", hList)); 260 261 VBOXCLIPBOARDLISTHDR hdrList; 262 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 263 if (RT_SUCCESS(rc)) 263 264 { 264 VBOXCLIPBOARDLISTENTRY Entry; 265 rc = SharedClipboardURITransferListRead(pTransfer, hList, &Entry); 265 LogFlowFunc(("cTotalObjects=%RU64, cbTotalSize=%RU64\n\n", 266 hdrList.cTotalObjects, hdrList.cbTotalSize)); 267 268 for (uint64_t i = 0; i < hdrList.cTotalObjects; i++) 269 { 270 VBOXCLIPBOARDLISTENTRY entryList; 271 rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList); 272 if (RT_SUCCESS(rc)) 273 { 274 } 275 else 276 break; 277 278 if (pTransfer->Thread.fStop) 279 break; 280 } 281 266 282 if (RT_SUCCESS(rc)) 267 283 { 268 284 /* 285 * Signal the "list complete" event so that this data object can return (valid) data via ::GetData(). 286 * This in turn then will create IStream instances (by the OS) for each file system object to handle. 287 */ 288 int rc2 = RTSemEventSignal(pThis->m_EventListComplete); 289 AssertRC(rc2); 290 291 LogFlowFunc(("Waiting for transfer to complete ...\n")); 292 293 /* Transferring stuff can take a while, so don't use any timeout here. */ 294 rc2 = RTSemEventWait(pThis->m_EventTransferComplete, RT_INDEFINITE_WAIT); 295 AssertRC(rc2); 269 296 } 270 else271 break;272 273 if (pTransfer->Thread.fStop)274 break;275 }276 277 if (RT_SUCCESS(rc))278 {279 /*280 * Signal the "list complete" event so that this data object can return (valid) data via ::GetData().281 * This in turn then will create IStream instances (by the OS) for each file system object to handle.282 */283 int rc2 = RTSemEventSignal(pThis->m_EventListComplete);284 AssertRC(rc2);285 286 LogFlowFunc(("Waiting for transfer to complete ...\n"));287 288 /* Transferring stuff can take a while, so don't use any timeout here. */289 rc2 = RTSemEventWait(pThis->m_EventTransferComplete, RT_INDEFINITE_WAIT);290 AssertRC(rc2);291 297 } 292 298 … … 294 300 } 295 301 296 SharedClipboardURIList HdrDestroy(&Hdr);302 SharedClipboardURIListOpenParmsDestroy(&openParmsList); 297 303 } 298 304 … … 497 503 if (RT_SUCCESS(rc)) 498 504 { 505 /* Don't block for too long here, as this also will screw other apps running on the OS. */ 499 506 LogFunc(("Waiting for listing to arrive ...\n")); 500 rc = RTSemEventWait(m_EventListComplete, 5 * 60 * 1000 /* 5 mintimeout */);507 rc = RTSemEventWait(m_EventListComplete, 10 * 1000 /* 10s timeout */); 501 508 if (RT_SUCCESS(rc)) 502 509 { … … 530 537 LogFlowFunc(("FormatIndex_FileContents: m_uObjIdx=%u\n", m_uObjIdx)); 531 538 539 SHAREDCLIPBOARDOBJHANDLE hObj = 0; /** @todo */ 540 532 541 /* Hand-in the provider so that our IStream implementation can continue working with it. */ 533 hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer, m_uObjIdx, &m_pStream);542 hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer, hObj, &m_pStream); 534 543 if (SUCCEEDED(hr)) 535 544 {
Note:
See TracChangeset
for help on using the changeset viewer.