VirtualBox

Changeset 55189 in vbox


Ignore:
Timestamp:
Apr 10, 2015 4:25:45 PM (9 years ago)
Author:
vboxsync
Message:

Main/VirtualBoxErrorInfo: Fix long-standing issue on Windows host when using this interface in the GUI process (which has to use a rather unusual apartment style, leading to marshaling issues between threads). The symptom was e.g. no detailed error information when a VM powerup failed due to inaccessible disks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h

    r47391 r55189  
    44
    55/*
    6  * Copyright (C) 2006-2013 Oracle Corporation
     6 * Copyright (C) 2006-2015 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3939        COM_INTERFACE_ENTRY(IVirtualBoxErrorInfo)
    4040        COM_INTERFACE_ENTRY(IDispatch)
     41        COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler)
    4142    END_COM_MAP()
     43
     44    HRESULT FinalConstruct()
     45    {
     46#ifndef VBOX_WITH_XPCOM
     47        return CoCreateFreeThreadedMarshaler((IUnknown *)(void *)this, &m_pUnkMarshaler);
     48#else
     49        return S_OK;
     50#endif
     51    }
     52
     53    void FinalRelease()
     54    {
     55#ifndef VBOX_WITH_XPCOM
     56        if (m_pUnkMarshaler)
     57        {
     58            m_pUnkMarshaler->Release();
     59            m_pUnkMarshaler = NULL;
     60        }
     61#endif
     62    }
    4263
    4364#ifndef VBOX_WITH_XPCOM
     
    128149    Utf8Str m_strComponent;
    129150    ComPtr<IVirtualBoxErrorInfo> mNext;
     151
     152#ifndef VBOX_WITH_XPCOM
     153    IUnknown *m_pUnkMarshaler;
     154#endif
    130155};
    131156
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