Changeset 56505 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jun 18, 2015 11:33:04 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
r55640 r56505 1303 1303 AssertReturn(obj.GetType() == DnDURIObject::File, VERR_INVALID_PARAMETER); 1304 1304 1305 uint32_t cbBuf = _64K; /** @todo Make this configurable? */ 1305 int rc = obj.Open(DnDURIObject::Source, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE); 1306 if (RT_FAILURE(rc)) 1307 { 1308 LogFunc(("Opening file \"%s\" failed with rc=%Rrc\n", obj.GetSourcePath().c_str(), rc)); 1309 return rc; 1310 } 1311 1312 uint32_t cbBuf = _64K; /** @todo Make this configurable? */ 1306 1313 void *pvBuf = RTMemAlloc(cbBuf); /** @todo Make this buffer part of PVBGLR3GUESTDNDCMDCTX? */ 1307 1314 if (!pvBuf) … … 1309 1316 1310 1317 RTCString strPath = obj.GetDestPath(); 1311 1312 int rc = obj.Open(DnDURIObject::Source, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE);1313 if (RT_FAILURE(rc))1314 {1315 LogFunc(("Opening file \"%s\" failed with rc=%Rrc\n", obj.GetSourcePath().c_str(), rc));1316 return rc;1317 }1318 1318 1319 1319 LogFlowFunc(("strFile=%s (%zu), cbSize=%RU64, fMode=0x%x\n", strPath.c_str(), strPath.length(), obj.GetSize(), obj.GetMode())); … … 1329 1329 MsgHdr.hdr.cParms = 6; 1330 1330 1331 MsgHdr.uContext.SetUInt32(0); /* Context ID; unused at the moment. */1331 MsgHdr.uContext.SetUInt32(0); /* Context ID; unused at the moment. */ 1332 1332 MsgHdr.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)(strPath.length() + 1)); 1333 1333 MsgHdr.cbName.SetUInt32((uint32_t)(strPath.length() + 1)); 1334 MsgHdr.uFlags.SetUInt32(0); /* Flags; unused at the moment. */1335 MsgHdr.fMode.SetUInt32(obj.GetMode()); 1336 MsgHdr.cbTotal.SetUInt64(obj.GetSize()); 1334 MsgHdr.uFlags.SetUInt32(0); /* Flags; unused at the moment. */ 1335 MsgHdr.fMode.SetUInt32(obj.GetMode()); /* File mode */ 1336 MsgHdr.cbTotal.SetUInt64(obj.GetSize()); /* File size (in bytes). */ 1337 1337 1338 1338 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(MsgHdr)), &MsgHdr, sizeof(MsgHdr)); … … 1470 1470 1471 1471 void *pvToSend = (void *)strRootDest.c_str(); 1472 uint32_t cbToSend = (uint32_t)strRootDest.length() + 1; 1472 uint32_t cbToSend = (uint32_t)strRootDest.length() + 1; /* Include string termination. */ 1473 1473 1474 1474 rc = vbglR3DnDGHSendDataInternal(pCtx, pvToSend, cbToSend,
Note:
See TracChangeset
for help on using the changeset viewer.