Changeset 100450 in vbox for trunk/src/VBox/Additions/WINNT
- 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/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r100433 r100450 515 515 case WM_RENDERFORMAT: /* Guest wants to render the clipboard data. */ 516 516 { 517 LogFunc(("WM_RENDERFORMAT\n"));518 519 517 /* Insert the requested clipboard format data into the clipboard. */ 520 const UINT cfFormat = (UINT)wParam; 521 522 const SHCLFORMAT fFormat = SharedClipboardWinClipboardFormatToVBox(cfFormat); 523 524 LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat)); 525 518 const UINT uFmtWin = (UINT)wParam; 519 const SHCLFORMAT uFmtVBox = SharedClipboardWinClipboardFormatToVBox(uFmtWin); 520 521 LogFunc(("WM_RENDERFORMAT: uFmtWin=%u -> uFmtVBox=0x%x\n", uFmtWin, uFmtVBox)); 526 522 #ifdef LOG_ENABLED 527 char *pszFmts = ShClFormatsToStrA( fFormat);523 char *pszFmts = ShClFormatsToStrA(uFmtVBox); 528 524 AssertPtrReturn(pszFmts, 0); 529 LogRel(("Shared Clipboard: Rendering Windows format %#x as VBox format '%s'\n", cfFormat, pszFmts));525 LogRel(("Shared Clipboard: Rendering Windows format %#x as VBox format '%s'\n", uFmtWin, pszFmts)); 530 526 RTStrFree(pszFmts); 531 527 #endif 532 if ( fFormat== VBOX_SHCL_FMT_NONE)528 if (uFmtVBox == VBOX_SHCL_FMT_NONE) 533 529 { 534 LogRel(("Shared Clipboard: Unsupported format (%#x) requested\n", cfFormat));530 LogRel(("Shared Clipboard: Unsupported format (%#x) requested\n", uFmtWin)); 535 531 SharedClipboardWinClear(); 536 532 } … … 548 544 { 549 545 /* Read the host data to the preallocated buffer. */ 550 int rc = VbglR3ClipboardReadDataEx(&pCtx->CmdCtx, fFormat, pvMem, cbPrealloc, &cb);546 int rc = VbglR3ClipboardReadDataEx(&pCtx->CmdCtx, uFmtVBox, pvMem, cbPrealloc, &cb); 551 547 if (RT_SUCCESS(rc)) 552 548 { … … 575 571 /* Read the host data to the preallocated buffer. */ 576 572 uint32_t cbNew = 0; 577 rc = VbglR3ClipboardReadDataEx(&pCtx->CmdCtx, fFormat, pvMem, cb, &cbNew);573 rc = VbglR3ClipboardReadDataEx(&pCtx->CmdCtx, uFmtVBox, pvMem, cb, &cbNew); 578 574 if ( RT_SUCCESS(rc) 579 575 && cbNew <= cb) … … 608 604 * must have the exact string size. 609 605 */ 610 if ( fFormat== VBOX_SHCL_FMT_UNICODETEXT)606 if (uFmtVBox == VBOX_SHCL_FMT_UNICODETEXT) 611 607 { 612 608 size_t cwcActual = 0; … … 625 621 } 626 622 } 627 else if ( fFormat== VBOX_SHCL_FMT_HTML)623 else if (uFmtVBox == VBOX_SHCL_FMT_HTML) 628 624 { 629 625 /* Wrap content into CF_HTML clipboard format if needed. */ … … 678 674 /* 'hMem' contains the host clipboard data. 679 675 * size is 'cb' and format is 'format'. */ 680 HANDLE hClip = SetClipboardData( cfFormat, hMem);676 HANDLE hClip = SetClipboardData(uFmtWin, hMem); 681 677 if (hClip) 682 678 {
Note:
See TracChangeset
for help on using the changeset viewer.