Changeset 100450 in vbox for trunk/src/VBox/HostServices/SharedClipboard
- Timestamp:
- Jul 10, 2023 11:03:30 AM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158194
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
r100432 r100450 496 496 case WM_RENDERFORMAT: 497 497 { 498 LogFunc(("WM_RENDERFORMAT\n"));499 500 498 /* Insert the requested clipboard format data into the clipboard. */ 501 const UINT uFormat = (UINT)wParam; 502 const SHCLFORMAT fFormat = SharedClipboardWinClipboardFormatToVBox(uFormat); 503 LogFunc(("WM_RENDERFORMAT: uFormat=%u -> fFormat=0x%x\n", uFormat, fFormat)); 504 505 if ( fFormat == VBOX_SHCL_FMT_NONE 499 const UINT uFmtWin = (UINT)wParam; 500 const SHCLFORMAT uFmtVBox = SharedClipboardWinClipboardFormatToVBox(uFmtWin); 501 502 LogFunc(("WM_RENDERFORMAT: uFmtWin=%u -> uFmtVBox=0x%x\n", uFmtWin, uFmtVBox)); 503 #ifdef LOG_ENABLED 504 char *pszFmts = ShClFormatsToStrA(uFmtVBox); 505 AssertPtrReturn(pszFmts, 0); 506 LogRel(("Shared Clipboard: Rendering Windows format %#x as VBox format '%s'\n", uFmtWin, pszFmts)); 507 RTStrFree(pszFmts); 508 #endif 509 if ( uFmtVBox == VBOX_SHCL_FMT_NONE 506 510 || pCtx->pClient == NULL) 507 511 { … … 514 518 void *pvData = NULL; 515 519 uint32_t cbData = 0; 516 int rc = ShClSvcReadDataFromGuest(pCtx->pClient, uF ormat, &pvData, &cbData);520 int rc = ShClSvcReadDataFromGuest(pCtx->pClient, uFmtVBox, &pvData, &cbData); 517 521 if ( RT_SUCCESS(rc) 518 522 && pvData … … 520 524 { 521 525 /* Wrap HTML clipboard content info CF_HTML format if needed. */ 522 if ( fFormat== VBOX_SHCL_FMT_HTML526 if (uFmtVBox == VBOX_SHCL_FMT_HTML 523 527 && !SharedClipboardWinIsCFHTML((char *)pvData)) 524 528 { … … 537 541 } 538 542 539 rc = SharedClipboardWinDataWrite(uF ormat, pvData, cbData);543 rc = SharedClipboardWinDataWrite(uFmtWin, pvData, cbData); 540 544 if (RT_FAILURE(rc)) 541 545 LogRel(("Shared Clipboard: Setting clipboard data for Windows host failed with %Rrc\n", rc));
Note:
See TracChangeset
for help on using the changeset viewer.