VirtualBox

Changeset 100510 in vbox


Ignore:
Timestamp:
Jul 11, 2023 11:54:05 AM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Also propagate the last error set via SharedClipboardWinDataObject::SetStatus(). bugref:9437

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/SharedClipboard-win.h

    r100461 r100510  
    333333    /** The object's current status. */
    334334    Status                      m_enmStatus;
     335    /** Last (IPRT-style) error set in conjunction with the status. */
     336    int                         m_rcStatus;
    335337    /** Data object callback table to use. */
    336338    CALLBACKS                   m_Callbacks;
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp

    r100504 r100510  
    5757    : m_pCtx(NULL)
    5858    , m_enmStatus(Uninitialized)
     59    , m_rcStatus(VERR_IPE_UNINITIALIZED_STATUS)
    5960    , m_lRefCount(0)
    6061    , m_cFormats(0)
     
    585586
    586587                        case Completed:
    587                             LogRel2(("Shared Clipboard: Transfer complete\n"));
     588                            LogRel2(("Shared Clipboard: Data object: Transfer complete\n"));
    588589                            break;
    589590
    590591                        case Canceled:
    591                             LogRel2(("Shared Clipboard: Transfer canceled\n"));
     592                            LogRel2(("Shared Clipboard: Data object: Transfer canceled\n"));
    592593                            break;
    593594
    594595                        case Error:
    595                             LogRel(("Shared Clipboard: Transfer error within data object thread occurred\n"));
     596                            LogRel(("Shared Clipboard: Data object: Transfer error %Rrc occurred\n", pThis->m_rcStatus));
    596597                            break;
    597598
     
    12731274 * @param   enmStatus           New status to signal.
    12741275 * @param   rc                  Result code. Optional.
     1276 *                              Errors only accepted when status also is 'Error'.
    12751277 *
    12761278 * @note    Caller must have taken the critical section.
     
    12811283    AssertReturn(RTCritSectIsOwned(&m_CritSect), VERR_WRONG_ORDER);
    12821284
    1283     RT_NOREF(rc);
    1284 
    1285     LogFlowFunc(("enmStatus=%#x (current is: %#x)\n", enmStatus, m_enmStatus));
     1285    LogFlowFunc(("enmStatus=%#x, rc=%Rrc (current is: %#x)\n", enmStatus, rc, m_enmStatus));
    12861286
    12871287    int rc2 = VINF_SUCCESS;
     1288
     1289    m_rcStatus = rc;
    12881290
    12891291    switch (enmStatus)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette