Changeset 80907 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Sep 19, 2019 1:12:34 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 133482
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r80905 r80907 161 161 #endif 162 162 163 /** 164 * Cleanup helper function for transfer callbacks. 165 * 166 * @param pData Callback data to cleanup. 167 */ 163 168 static void vboxClipboardTransferCallbackCleanup(PSHCLTRANSFERCALLBACKDATA pData) 164 169 { … … 194 199 if (RT_SUCCESS(rc)) 195 200 { 196 PSHCLTRANSFER pTransfer; 197 rc = SharedClipboardTransferCreate(&pTransfer); 198 if (RT_SUCCESS(rc)) 199 rc = SharedClipboardTransferInit(pTransfer, 0 /* uID */, 200 SHCLTRANSFERDIR_WRITE, SHCLSOURCE_LOCAL); 201 if (RT_SUCCESS(rc)) 201 /* The data data in CF_HDROP format, as the files are locally present and don't need to be 202 * presented as a IDataObject or IStream. */ 203 HANDLE hClip = hClip = GetClipboardData(CF_HDROP); 204 if (hClip) 202 205 { 203 /* The data data in CF_HDROP format, as the files are locally present and don't need to be 204 * presented as a IDataObject or IStream. */ 205 HANDLE hClip = hClip = GetClipboardData(CF_HDROP); 206 if (hClip) 206 HDROP hDrop = (HDROP)GlobalLock(hClip); 207 if (hDrop) 207 208 { 208 HDROP hDrop = (HDROP)GlobalLock(hClip); 209 if (hDrop) 209 char *papszList = NULL; 210 uint32_t cbList; 211 rc = SharedClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList); 212 213 GlobalUnlock(hClip); 214 215 if (RT_SUCCESS(rc)) 210 216 { 211 char *papszList = NULL; 212 uint32_t cbList; 213 rc = SharedClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList); 214 215 GlobalUnlock(hClip); 216 217 if (RT_SUCCESS(rc)) 218 { 219 rc = SharedClipboardTransferRootsSet(pTransfer, 220 papszList, cbList + 1 /* Include termination */); 221 RTStrFree(papszList); 222 } 217 rc = SharedClipboardTransferRootsSet(pData->pTransfer, 218 papszList, cbList + 1 /* Include termination */); 219 RTStrFree(papszList); 223 220 } 224 else225 {226 hClip = NULL;227 }221 } 222 else 223 { 224 hClip = NULL; 228 225 } 229 226 }
Note:
See TracChangeset
for help on using the changeset viewer.