Changeset 79672 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jul 10, 2019 1:02:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r79630 r79672 80 80 PVBOXCLIPBOARDCONTEXT pClipboardCtx; 81 81 PSHAREDCLIPBOARDURITRANSFER pTransfer; 82 char *papszURIList;83 uint32_t cbURIList;84 82 } VBOXCLIPBOARDURIWRITETHREADCTX, *PVBOXCLIPBOARDURIWRITETHREADCTX; 85 83 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ … … 156 154 VbglR3ClipboardDisconnect(uClientID); 157 155 } 158 159 if (pCtx->papszURIList)160 RTStrFree(pCtx->papszURIList);161 156 162 157 RTMemFree(pCtx); … … 787 782 if (RT_SUCCESS(rc)) 788 783 { 789 #if 0 790 SHAREDCLIPBOARDURITRANSFERCALLBACKS TransferCallbacks; 791 RT_ZERO(TransferCallbacks); 792 793 TransferCallbacks.pvUser = &pCtx->URI; 794 TransferCallbacks.pfnTransferComplete = vboxClipboardURITransferCompleteCallback; 795 TransferCallbacks.pfnTransferError = vboxClipboardURITransferErrorCallback; 796 797 SharedClipboardURITransferSetCallbacks(pTransfer, &TransferCallbacks); 798 799 SHAREDCLIPBOARDPROVIDERCREATIONCTX creationCtx; 800 RT_ZERO(creationCtx); 801 creationCtx.enmSource = SHAREDCLIPBOARDSOURCE_LOCAL; 802 803 RT_ZERO(creationCtx.Interface); 804 creationCtx.Interface.pfnListHdrWrite = vboxClipboardURIListHdrWrite; 805 creationCtx.Interface.pfnListEntryWrite = vboxClipboardURIListEntryWrite; 806 creationCtx.Interface.pfnObjOpen = vboxClipboardURIObjOpen; 807 creationCtx.Interface.pfnObjClose = vboxClipboardURIObjClose; 808 creationCtx.Interface.pfnObjWrite = vboxClipboardURIObjWrite; 809 810 creationCtx.pvUser = pCtx; 811 812 rc = SharedClipboardURITransferSetInterface(pTransfer, &creationCtx); 784 rc = SharedClipboardURICtxTransferAdd(&pCtx->URI, pTransfer); 813 785 if (RT_SUCCESS(rc)) 814 786 { 815 #endif 816 rc = SharedClipboardURICtxTransferAdd(&pCtx->URI, pTransfer); 817 if (RT_SUCCESS(rc)) 787 /* The data data in CF_HDROP format, as the files are locally present and don't need to be 788 * presented as a IDataObject or IStream. */ 789 HANDLE hClip = hClip = GetClipboardData(CF_HDROP); 790 if (hClip) 818 791 { 819 /* The data data in CF_HDROP format, as the files are locally present and don't need to be 820 * presented as a IDataObject or IStream. */ 821 HANDLE hClip = hClip = GetClipboardData(CF_HDROP); 822 if (hClip) 792 HDROP hDrop = (HDROP)GlobalLock(hClip); 793 if (hDrop) 823 794 { 824 HDROP hDrop = (HDROP)GlobalLock(hClip); 825 if (hDrop) 795 char *papszList; 796 uint32_t cbList; 797 rc = VBoxClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList); 798 799 GlobalUnlock(hClip); 800 801 if (RT_SUCCESS(rc)) 826 802 { 827 char *papszList; 828 uint32_t cbList; 829 rc = VBoxClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList); 803 rc = SharedClipboardURILTransferSetRoots(pTransfer, papszList, cbList); 830 804 if (RT_SUCCESS(rc)) 831 805 { … … 836 810 pThreadCtx->pClipboardCtx = pCtx; 837 811 pThreadCtx->pTransfer = pTransfer; 838 pThreadCtx->papszURIList = papszList; 839 pThreadCtx->cbURIList = cbList; 840 841 GlobalUnlock(hClip); 842 812 813 rc = SharedClipboardURITransferPrepare(pTransfer); 843 814 if (RT_SUCCESS(rc)) 844 815 { 845 rc = SharedClipboardURITransferPrepare(pTransfer); 846 if (RT_SUCCESS(rc)) 847 { 848 rc = SharedClipboardURITransferRun(pTransfer, vboxClipboardURIWriteThread, 849 pThreadCtx /* pvUser */); 850 /* pThreadCtx now is owned by vboxClipboardURIWriteThread(). */ 851 } 816 rc = SharedClipboardURITransferRun(pTransfer, vboxClipboardURIWriteThread, 817 pThreadCtx /* pvUser */); 818 /* pThreadCtx now is owned by vboxClipboardURIWriteThread(). */ 852 819 } 853 820 } 854 821 else 855 822 rc = VERR_NO_MEMORY; 856 857 if (RT_FAILURE(rc))858 {859 RTStrFree(papszList);860 }861 823 } 862 } 863 else 864 { 865 hClip = NULL; 824 825 if (papszList) 826 RTStrFree(papszList); 866 827 } 867 828 } 829 else 830 { 831 hClip = NULL; 832 } 868 833 } 869 //}834 } 870 835 } 871 836
Note:
See TracChangeset
for help on using the changeset viewer.