Changeset 78809 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
- Timestamp:
- May 28, 2019 10:54:53 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r78725 r78809 393 393 if (pWinCtx->URI.cTransfers == 0) /* Only allow one transfer at a time for now. */ 394 394 { 395 pWinCtx->URI.Transfer.pDataObj = new VBoxClipboardWinDataObject( &pWinCtx->URI.Transfer.Provider);395 pWinCtx->URI.Transfer.pDataObj = new VBoxClipboardWinDataObject(pWinCtx->URI.Transfer.pProvider); 396 396 if (pWinCtx->URI.Transfer.pDataObj) 397 397 { … … 416 416 } 417 417 } 418 else 419 LogRel(("Clipboard: Only one transfer at a time supported (current %RU32 transfer(s) active), skipping\n", 420 pWinCtx->URI.cTransfers)); 418 421 } 419 422 #endif … … 424 427 425 428 VBoxClipboardWinClose(); 426 /* Note: Clipboard must be closed first before calling OleSetClipboard(). */427 429 428 430 LogFunc(("VBOX_WM_SHCLPB_SET_FORMATS: cfFormat=%u, lastErr=%ld\n", cfFormat, GetLastError())); … … 662 664 } 663 665 664 pCtx->pEnv = pEnv;665 666 666 if (VbglR3AutoLogonIsRemoteSession()) 667 667 { … … 671 671 } 672 672 673 int rc; 673 pCtx->pEnv = pEnv; 674 675 int rc = VINF_SUCCESS; 674 676 675 677 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST … … 681 683 } 682 684 else 685 { 683 686 LogRel(("Clipboard: Initialized OLE\n")); 684 685 rc = pCtx->Win.URI.Transfer.Provider.SetSource(SharedClipboardProvider::SourceType_VbglR3); 686 AssertRC(rc); 687 rc = VBoxClipboardWinURIInit(&pCtx->Win.URI, SharedClipboardProvider::SourceType_VbglR3); 688 } 687 689 #endif 688 690 689 /* Check that new Clipboard API is available */690 VBoxClipboardWinCheckAndInitNewAPI(&pCtx->Win.newAPI);691 692 rc = VbglR3ClipboardConnect(&pCtx->u32ClientID);693 691 if (RT_SUCCESS(rc)) 694 692 { 695 rc = vboxClipboardCreateWindow(pCtx); 693 /* Check if new Clipboard API is available. */ 694 /* ignore rc */ VBoxClipboardWinCheckAndInitNewAPI(&pCtx->Win.newAPI); 695 696 rc = VbglR3ClipboardConnect(&pCtx->u32ClientID); 696 697 if (RT_SUCCESS(rc)) 697 698 { 698 *ppInstance = pCtx; 699 } 700 else 701 { 702 VbglR3ClipboardDisconnect(pCtx->u32ClientID); 699 rc = vboxClipboardCreateWindow(pCtx); 700 if (RT_SUCCESS(rc)) 701 { 702 *ppInstance = pCtx; 703 } 704 else 705 { 706 VbglR3ClipboardDisconnect(pCtx->u32ClientID); 707 } 703 708 } 704 709 } … … 821 826 822 827 vboxClipboardDestroy(pCtx); 823 RT_BZERO(pCtx, sizeof(VBOXCLIPBOARDCONTEXT)); 824 825 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST_ASF 828 829 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 826 830 OleSetClipboard(NULL); /* Make sure to flush the clipboard on destruction. */ 827 831 OleUninitialize(); 832 833 VBoxClipboardWinURIDestroy(&pCtx->Win.URI); 828 834 #endif 829 835
Note:
See TracChangeset
for help on using the changeset viewer.