- 時間撮記:
- 2015-10-22 上午10:34:26 (9 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
r58329 r58370 243 243 DnDAction_T aDefaultAction, 244 244 const std::vector<DnDAction_T> &aAllowedActions, 245 const GuestDnDMIMEList 245 const GuestDnDMIMEList &aFormats, 246 246 DnDAction_T *aResultAction) 247 247 { … … 281 281 * as GuestDnDTarget acts as a source for the guest. 282 282 */ 283 Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));283 Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats)); 284 284 if (strFormats.isEmpty()) 285 285 return setError(E_INVALIDARG, tr("No or not supported format(s) specified")); 286 const uint32_t cbFormats = (uint32_t)strFormats.length() + 1; /* Include terminating zero. */ 286 287 287 288 LogRel2(("DnD: Offered formats to guest:\n")); … … 310 311 Msg.setNextUInt32(uDefAction); 311 312 Msg.setNextUInt32(uAllowedActions); 312 Msg.setNextPointer((void *)strFormats.c_str(), strFormats.length() + 1);313 Msg.setNextUInt32( strFormats.length() + 1);313 Msg.setNextPointer((void *)strFormats.c_str(), cbFormats); 314 Msg.setNextUInt32(cbFormats); 314 315 315 316 rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms()); … … 368 369 * as GuestDnDTarget acts as a source for the guest. 369 370 */ 370 Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));371 Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats)); 371 372 if (strFormats.isEmpty()) 372 373 return setError(E_INVALIDARG, tr("No or not supported format(s) specified")); 374 const uint32_t cbFormats = (uint32_t)strFormats.length() + 1; /* Include terminating zero. */ 373 375 374 376 HRESULT hr = S_OK; … … 386 388 Msg.setNextUInt32(uDefAction); 387 389 Msg.setNextUInt32(uAllowedActions); 388 Msg.setNextPointer((void *)strFormats.c_str(), strFormats.length() + 1);389 Msg.setNextUInt32( strFormats.length() + 1);390 Msg.setNextPointer((void *)strFormats.c_str(), cbFormats); 391 Msg.setNextUInt32(cbFormats); 390 392 391 393 rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms()); … … 483 485 * as GuestDnDTarget acts as a source for the guest. 484 486 */ 485 Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));487 Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats)); 486 488 if (strFormats.isEmpty()) 487 489 return setError(E_INVALIDARG, tr("No or not supported format(s) specified")); 490 const uint32_t cbFormats = (uint32_t)strFormats.length() + 1; /* Include terminating zero. */ 488 491 489 492 /* Adjust the coordinates in a multi-monitor setup. */ … … 500 503 Msg.setNextUInt32(uDefAction); 501 504 Msg.setNextUInt32(uAllowedActions); 502 Msg.setNextPointer((void*)strFormats.c_str(), strFormats.length() + 1);503 Msg.setNextUInt32( strFormats.length() + 1);505 Msg.setNextPointer((void*)strFormats.c_str(), cbFormats); 506 Msg.setNextUInt32(cbFormats); 504 507 505 508 int rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms()); … … 1325 1328 */ 1326 1329 void *pvFmt = (void *)pCtx->mFmtReq.c_str(); 1327 uint32_t cbFmt = pCtx->mFmtReq.length() + 1;/* Include terminating zero. */1330 uint32_t cbFmt = (uint32_t)pCtx->mFmtReq.length() + 1; /* Include terminating zero. */ 1328 1331 1329 1332 pData->setFmt(pvFmt, cbFmt);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器