Changeset 50730 in vbox
- Timestamp:
- Mar 10, 2014 8:40:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnDDropTarget.cpp
r50561 r50730 23 23 #include "VBoxDnD.h" 24 24 25 #include "VBox/GuestHost/DragAndDrop.h" 25 26 #include "VBox/HostServices/DragAndDropSvc.h" 26 27 … … 452 453 if (RT_SUCCESS(rc)) 453 454 { 454 uint32_t cbSize = cchFiles * sizeof(char); 455 Assert(cbSize); 456 457 mpvData = RTMemDup(pszFiles, cbSize); 458 if (mpvData) 455 uint32_t cbFiles = cchFiles * sizeof(char); 456 Assert(cbFiles); 457 458 /* Translate the list into URI elements. */ 459 DnDURIList lstURI; 460 rc = lstURI.AppendNativePathsFromList(pszFiles, cbFiles, 461 0 /* Flags */); 462 if (RT_SUCCESS(rc)) 459 463 { 460 mcbData = cbSize; 464 RTCString strRoot = lstURI.RootToString(); 465 size_t cbRoot = strRoot.length(); 466 467 mpvData = RTMemAllocZ(cbRoot + 1 /* Include termination */); 468 if (mpvData) 469 { 470 memcpy(mpvData, strRoot.raw(), cbRoot); 471 mcbData = cbRoot + 1; 472 } 473 else 474 rc = VERR_NO_MEMORY; 461 475 } 462 else463 rc = VERR_NO_MEMORY;464 476 } 465 477
Note:
See TracChangeset
for help on using the changeset viewer.