VirtualBox

Changeset 35638 in vbox for trunk


Ignore:
Timestamp:
Jan 19, 2011 7:10:49 PM (14 years ago)
Author:
vboxsync
Message:

Main. QT/FE: fix long standing COM issue

Location:
trunk
Files:
100 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/com.h

    r30681 r35638  
    3535/**
    3636 *  Initializes the COM runtime.
    37  *  Must be called on the main thread, before any COM activity in any thread.
     37 *  Must be called on the main thread, before any COM activity in any thread, and by any thread
     38 *  willing to perform COM operations.
    3839 *
     40 *  @param fMain     if call is performed on the GUI thread
    3941 *  @return COM result code
    4042 */
    41 HRESULT Initialize();
     43HRESULT Initialize(bool fGui = false);
    4244
    4345/**
  • trunk/include/VBox/com/defs.h

    r34655 r35638  
    7676#include <objbase.h>
    7777#ifndef VBOX_COM_NO_ATL
     78# define _ATL_FREE_THREADED
     79
    7880# include <atlbase.h>
    7981#include <atlcom.h>
     
    527529        return E_NOINTERFACE;                                                \
    528530    }
     531
     532
     533#define VBOX_DEFAULT_INTERFACE_ENTRIES(iface)                                \
     534        COM_INTERFACE_ENTRY(ISupportErrorInfo)                               \
     535        COM_INTERFACE_ENTRY(iface)                                           \
     536        COM_INTERFACE_ENTRY2(IDispatch,iface)                                \
     537        COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
    529538#else
    530539#define VBOX_SCRIPTABLE_IMPL(iface)                     \
    531540    public iface
    532541#define VBOX_SCRIPTABLE_DISPATCH_IMPL(iface)
     542#define VBOX_DEFAULT_INTERFACE_ENTRIES(iface)
    533543#endif
    534544
  • trunk/src/VBox/Frontends/VBoxBFE/COMDefs.h

    r28800 r35638  
    4747#define COM_INTERFACE_ENTRY2(a,b)
    4848#define END_COM_MAP()
     49#define VBOX_DEFAULT_INTERFACE_ENTRIES(a)
     50#define BaseFinalConstruct() (S_OK)
     51#define BaseFinalRelease()
    4952
    5053#ifndef RT_OS_WINDOWS
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp

    r35524 r35638  
    2222#if !defined (VBOX_WITH_XPCOM)
    2323
     24
    2425#else /* !defined (VBOX_WITH_XPCOM) */
    2526
     
    8788 *  Initializes COM/XPCOM.
    8889 */
    89 HRESULT COMBase::InitializeCOM()
     90HRESULT COMBase::InitializeCOM(bool fGui)
    9091{
    9192    LogFlowFuncEnter();
    9293
    93     /* Note: On Win32, Qt somehow calls CoInitialize[Ex]() during creation of
    94      * the QApplication instance (didn't explore deeply why it does so) with
    95      * different flags which is incompatible with our multithreaded
    96      * apartment. com::Initialize() will properly care of this situation. */
    97 
    98     HRESULT rc = com::Initialize();
     94    HRESULT rc = com::Initialize(fGui);
    9995
    10096#if defined (VBOX_WITH_XPCOM)
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h

    r34740 r35638  
    203203public:
    204204
    205     static HRESULT InitializeCOM();
     205    static HRESULT InitializeCOM(bool fGui);
    206206    static HRESULT CleanupCOM();
    207207
     
    355355
    356356    /* no arbitrary instance creations */
    357     COMBase() : mRC (S_OK) {};
     357    COMBase() : mRC (S_OK) {}
    358358
    359359#if defined (VBOX_WITH_XPCOM)
     
    633633    // constructors & destructor
    634634
    635     CInterface() : mIface (NULL) {}
    636 
    637     CInterface (const CInterface &that) : B (that), mIface (that.mIface)
    638     {
    639         addref (mIface);
    640     }
    641 
    642     CInterface (I *aIface) : mIface (aIface) { addref (mIface); }
    643 
    644     virtual ~CInterface() { release (mIface); }
     635    CInterface()
     636    {
     637        clear();
     638    }
     639
     640    CInterface (const CInterface &that) : B (that)
     641    {   
     642        clear();
     643        mIface = that.mIface;
     644        addref(ptr());
     645    }
     646
     647    CInterface (I *aIface)
     648    {
     649        clear();
     650        setPtr (aIface);
     651        addref (aIface);
     652    }
     653
     654    virtual ~CInterface()
     655    {
     656        detach();
     657#ifdef DEBUG
     658        mDead = true;
     659#endif
     660    }
    645661
    646662    // utility methods
    647 
    648663    void createInstance (const CLSID &aClsId)
    649664    {
    650         AssertMsg (!mIface, ("Instance is already non-NULL\n"));
    651         if (!mIface)
    652         {
     665        AssertMsg (ptr() == NULL, ("Instance is already non-NULL\n"));
     666        if (ptr() == NULL)
     667        {
     668            I* pObj = NULL;
    653669#if !defined (VBOX_WITH_XPCOM)
    654 
    655670            B::mRC = CoCreateInstance (aClsId, NULL, CLSCTX_ALL,
    656                                        _ATL_IIDOF (I), (void **) &mIface);
    657 
    658 #else /* !defined (VBOX_WITH_XPCOM) */
    659 
     671                                       _ATL_IIDOF (I), (void **) &pObj);
     672#else
    660673            nsCOMPtr <nsIComponentManager> manager;
    661674            B::mRC = NS_GetComponentManager (getter_AddRefs (manager));
    662675            if (SUCCEEDED (B::mRC))
    663676                B::mRC = manager->CreateInstance (aClsId, nsnull, NS_GET_IID (I),
    664                                                   (void **) &mIface);
    665 
    666 #endif /* !defined (VBOX_WITH_XPCOM) */
    667 
     677                                                  (void **) &pObj);
     678#endif
     679             
     680            if (SUCCEEDED (B::mRC))
     681               setPtr(pObj);
     682            else
     683               setPtr(NULL);
     684           
    668685            /* fetch error info, but don't assert if it's missing -- many other
    669686             * reasons can lead to an error (w/o providing error info), not only
    670687             * the instance initialization code (that should always provide it) */
    671688            B::fetchErrorInfo (NULL, NULL);
    672         }
     689         }
    673690    }
    674691
     
    680697    void attach (OI *aIface)
    681698    {
     699#ifdef DEBUG
     700        Assert(!mDead);
     701#endif
    682702        /* be aware of self assignment */
     703        I* amIface = ptr();
    683704        addref (aIface);
    684         release (mIface);
     705        release (amIface);
    685706        if (aIface)
    686707        {
    687             mIface = NULL;
    688             B::mRC = aIface->QueryInterface (COM_IIDOF (I), (void **) &mIface);
     708            amIface = NULL;
     709            B::mRC = aIface->QueryInterface (COM_IIDOF (I), (void **) &amIface);
    689710            release (aIface);
     711            setPtr(amIface);
    690712        }
    691713        else
    692714        {
    693             mIface = NULL;
     715            setPtr(NULL);
    694716            B::mRC = S_OK;
    695717        }
     
    699721    void attach (I *aIface)
    700722    {
     723#ifdef DEBUG
     724        Assert(!mDead);
     725#endif
    701726        /* be aware of self assignment */
    702727        addref (aIface);
    703         release (mIface);
    704         mIface = aIface;
     728        release (ptr());
     729        setPtr(aIface);
    705730        B::mRC = S_OK;
    706731    };
    707732
    708733    /** Detaches from the underlying interface pointer. */
    709     void detach() { release (mIface); mIface = NULL; }
     734    void detach()
     735    {
     736#ifdef DEBUG
     737       Assert(!mDead);
     738#endif
     739       release (ptr());
     740       setPtr(NULL);
     741    }
    710742
    711743    /** Returns @c true if not attached to any interface pointer. */
    712     bool isNull() const { return mIface == NULL; }
     744    bool isNull() const
     745    {
     746#ifdef DEBUG
     747       Assert(!mDead);
     748#endif
     749       return mIface == NULL;
     750    }
    713751
    714752    /**
     
    733771    CInterface &operator= (const CInterface &that)
    734772    {
    735         attach (that.mIface);
     773        attach (that.ptr());
    736774        B::operator= (that);
    737775        return *this;
     
    748786     * else but in generated wrappers and for debugging. You've been warned.
    749787     */
    750     I *raw() const { return mIface; }
    751 
    752     bool operator== (const CInterface &that) const { return mIface == that.mIface; }
    753     bool operator!= (const CInterface &that) const { return mIface != that.mIface; }
    754 
    755 /**
    756  * @todo: rethink if we'll ever need 'protected' back, removed to allow mIface access in rather
    757  *        nontrivial inheritance situations, see 'friend wrappers' code in COMWrappers.xsl
    758  */
    759 //protected:
    760 
    761     mutable I *mIface;
     788    I *raw() const
     789    {
     790       return ptr();
     791    }
     792
     793    bool operator== (const CInterface &that) const { return ptr() == that.ptr(); }
     794    bool operator!= (const CInterface &that) const { return ptr() != that.ptr(); }
     795
     796    I* ptr() const
     797    {
     798#ifdef DEBUG
     799      Assert(!mDead);
     800#endif
     801
     802      return   mIface;
     803    }
     804
     805    void setPtr(I* aObj) const
     806    {
     807#ifdef DEBUG
     808      Assert(!mDead);
     809#endif
     810      mIface = aObj;
     811    }
     812
     813private:
     814#ifdef DEBUG
     815    bool          mDead;
     816#endif
     817    mutable I *   mIface;
     818
     819    void clear()
     820    {
     821       mIface = NULL;       
     822#ifdef DEBUG
     823       mDead = false;
     824#endif
     825    }
    762826};
    763827
     
    776840    explicit CUnknown (const CInterface <OI, OB> &that)
    777841    {
    778         attach (that.mIface);
     842        attach (that.ptr());
    779843        if (SUCCEEDED (mRC))
    780844        {
     
    802866    CUnknown &operator= (const CInterface <OI, OB> &that)
    803867    {
    804         attach (that.mIface);
     868        attach (that.ptr());
    805869        if (SUCCEEDED (mRC))
    806870        {
     
    833897        return *this;
    834898    }
    835 
    836     /* @internal Used in generated wrappers. Never use directly. */
    837     IUnknown *&rawRef() { return mIface; };
    838899};
    839900
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl

    r34783 r35638  
    951951        <xsl:text>&#x0A;{&#x0A;</xsl:text>
    952952        <!-- iface assertion -->
    953         <xsl:text>    AssertReturnVoid(mIface);&#x0A;</xsl:text>
     953        <xsl:text>    AssertReturnVoid(ptr());&#x0A;</xsl:text>
    954954        <!-- method call -->
    955955        <xsl:call-template name="composeMethodCall">
     
    990990        <xsl:text>;&#x0A;</xsl:text>
    991991        <!-- iface assertion -->
    992         <xsl:text>    AssertReturn(mIface, a</xsl:text>
     992        <xsl:text>    AssertReturn(ptr(), a</xsl:text>
    993993        <xsl:call-template name="capitalize">
    994994          <xsl:with-param name="str" select="$return/@name"/>
     
    10971097  </xsl:choose>
    10981098  <!-- start the call -->
    1099   <xsl:text>    mRC = mIface-></xsl:text>
     1099  <xsl:text>    mRC = ptr()-></xsl:text>
    11001100  <xsl:choose>
    11011101    <!-- attribute method call -->
     
    11371137  </xsl:choose>
    11381138  <xsl:text>);&#x0A;</xsl:text>
     1139
     1140  <xsl:text>#ifdef RT_OS_WINDOWS&#x0A;</xsl:text>
     1141  <xsl:text>    Assert(mRC != RPC_E_WRONG_THREAD);&#x0A;</xsl:text>
     1142  <xsl:text>#endif;&#x0A;</xsl:text>
     1143
    11391144  <!-- apply 'post-call' hooks -->
    11401145  <xsl:choose>
     
    12011206      <xsl:if test="$supports='strict' or $supports='yes'">
    12021207        <xsl:text>    if (RT_UNLIKELY(mRC != S_OK))&#x0A;    {&#x0A;</xsl:text>
    1203         <xsl:text>        fetchErrorInfo(mIface, &amp;COM_IIDOF(Base::Iface));&#x0A;</xsl:text>
     1208        <xsl:text>        fetchErrorInfo(ptr(), &amp;COM_IIDOF(Base::Iface));&#x0A;</xsl:text>
    12041209        <xsl:if test="$supports='strict'">
    12051210          <xsl:text>        AssertMsg(errInfo.isFullAvailable(), </xsl:text>
     
    12941299            <xsl:with-param name="str" select="@name"/>
    12951300          </xsl:call-template>
    1296           <xsl:choose>
    1297             <xsl:when test="@type='$unknown'">
    1298               <xsl:text>.raw()</xsl:text>
    1299             </xsl:when>
    1300             <xsl:otherwise>
    1301               <xsl:text>.mIface</xsl:text>
    1302             </xsl:otherwise>
    1303           </xsl:choose>
     1301          <xsl:text>.ptr()</xsl:text>
    13041302        </xsl:when>
    13051303        <xsl:when test="$isOut">
    1306           <xsl:text>&amp;a</xsl:text>
    1307           <xsl:call-template name="capitalize">
    1308             <xsl:with-param name="str" select="@name"/>
    1309           </xsl:call-template>
    1310           <xsl:choose>
    1311             <xsl:when test="@type='$unknown'">
    1312               <xsl:text>.rawRef()</xsl:text>
    1313             </xsl:when>
    1314             <xsl:otherwise>
    1315               <xsl:text>.mIface</xsl:text>
    1316             </xsl:otherwise>
    1317           </xsl:choose>
     1304          <xsl:value-of select="concat('&amp;', @name, 'Ptr')"/>
    13181305        </xsl:when>
    13191306      </xsl:choose>
     
    17831770  )"/>
    17841771
     1772  <xsl:variable name="is_out" select="(
     1773      (name()='attribute' and not($isSetter)) or
     1774      (name()='param' and (@dir='out' or @dir='return'))
     1775   )"/>
     1776
    17851777  <xsl:choose>
    17861778    <xsl:when test="$when='pre-call'">
     
    18381830          </xsl:if>
    18391831        </xsl:when>
     1832        <xsl:when test="$is_out and ($is_iface or (@type='$unknown'))">
     1833          <xsl:text>    </xsl:text>
     1834          <xsl:choose>
     1835            <xsl:when test="@type='$unknown'">
     1836              <xsl:text>IUnknown</xsl:text>
     1837              </xsl:when>
     1838             <xsl:otherwise>
     1839                <xsl:value-of select="@type"/>
     1840             </xsl:otherwise>
     1841           </xsl:choose>
     1842           <xsl:value-of select="concat('* ',@name,'Ptr = NULL;&#10;')"/>
     1843        </xsl:when>
    18401844      </xsl:choose>
    18411845    </xsl:when>
     
    18431847      <xsl:choose>
    18441848        <xsl:when test="@safearray='yes'">
    1845           <xsl:if test="(name()='attribute' and not($isSetter)) or
    1846                         (name()='param' and (@dir='out' or @dir='return'))">
     1849          <xsl:if test="$is_out">
    18471850            <!-- convert SafeArray to QVector -->
    18481851            <xsl:choose>
     
    18641867          </xsl:if>
    18651868        </xsl:when>
     1869        <xsl:when test="$is_out and ($is_iface or (@type='$unknown'))">
     1870            <xsl:text>    a</xsl:text>
     1871            <xsl:call-template name="capitalize">
     1872              <xsl:with-param name="str" select="@name"/>
     1873            </xsl:call-template>
     1874           <xsl:value-of select="concat('.setPtr(',@name,'Ptr);&#10;')"/>
     1875        </xsl:when>
    18661876      </xsl:choose>
    18671877    </xsl:when>
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r35634 r35638  
    23902390        {
    23912391            LogFlow (("MediaEnumThread started.\n"));
    2392             COMBase::InitializeCOM();
     2392            COMBase::InitializeCOM(false);
    23932393
    23942394            CVirtualBox mVBox = vboxGlobal().virtualBox();
     
    47654765#endif
    47664766
    4767 #ifdef Q_WS_WIN
    4768     /* COM for the main thread is initialized in main() */
    4769 #else
    4770     HRESULT rc = COMBase::InitializeCOM();
     4767    HRESULT rc = COMBase::InitializeCOM(true);
    47714768    if (FAILED (rc))
    47724769    {
     
    47744771        return;
    47754772    }
    4776 #endif
    47774773
    47784774    mVBox.createInstance (CLSID_VirtualBox);
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r35636 r35638  
    290290    ShutUpAppKit();
    291291# endif
    292 
    293 #ifdef Q_WS_WIN
    294     /* Initialize COM early, before QApplication calls OleInitialize(), to
    295      * make sure we enter the multi threaded apartment instead of a single
    296      * threaded one. Note that this will make some non-threadsafe system
    297      * services that use OLE and require STA (such as Drag&Drop) not work
    298      * anymore, however it's still better because otherwise VBox will not work
    299      * on some Windows XP systems at all since it requires MTA (we cannot
    300      * leave STA by calling CoUninitialize() and re-enter MTA on those systems
    301      * for some unknown reason), see also src/VBox/Main/glue/initterm.cpp. */
    302     /// @todo find a proper solution that satisfies both OLE and VBox
    303     HRESULT hrc = COMBase::InitializeCOM();
    304 #endif
    305292
    306293    for (int i=0; i<argc; i++)
     
    464451        do
    465452        {
    466 #ifdef Q_WS_WIN
    467             /* Check for the COM error after we've initialized Qt */
    468             if (FAILED (hrc))
    469             {
    470                 vboxProblem().cannotInitCOM (hrc);
    471                 break;
    472             }
    473 #endif
    474 
    475453            if (!vboxGlobal().isValid())
    476454                break;
     
    555533    }
    556534
    557 #ifdef Q_WS_WIN
    558     /* See COMBase::initializeCOM() above */
    559     if (SUCCEEDED (hrc))
    560         COMBase::CleanupCOM();
    561 #endif
    562 
    563535    LogFlowFunc (("rc=%d\n", rc));
    564536    LogFlowFuncLeave();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp

    r35613 r35638  
    6767    QImage scaledImage;
    6868
     69
    6970    /* If scaled-factor is set and current image is NOT null: */
    7071    if (m_scaledSize.isValid() && !m_img.isNull())
     
    9394    QPainter painter(m_pMachineView->viewport());
    9495
     96   
    9597    if ((ulong)r.width() < m_width * 2 / 3)
    9698    {
  • trunk/src/VBox/Main/glue/initterm.cpp

    r33540 r35638  
    247247 * @return S_OK on success and a COM result code in case of failure.
    248248 */
    249 HRESULT Initialize()
     249HRESULT Initialize(bool fGui)
    250250{
    251251    HRESULT rc = E_FAIL;
     
    253253#if !defined(VBOX_WITH_XPCOM)
    254254
    255     DWORD flags = COINIT_MULTITHREADED
     255    /**
     256      * We initialize COM in GUI thread in STA, to be compliant with QT and
     257      * OLE requirments (for example to allow D&D), while other threads
     258      * initialized in regular MTA. To allow fast proxyless access from
     259      * GUI thread to COM objects, we explicitly provide our COM objects
     260      * with free threaded marshaller.
     261      * !!!!! Please think twice before touching this code !!!!!
     262      */
     263    DWORD flags = fGui ?
     264                  COINIT_APARTMENTTHREADED
     265                | COINIT_SPEED_OVER_MEMORY
     266                :
     267                  COINIT_MULTITHREADED
    256268                | COINIT_DISABLE_OLE1DDE
    257269                | COINIT_SPEED_OVER_MEMORY;
    258270
    259271    rc = CoInitializeEx(NULL, flags);
    260 
    261     /// @todo the below rough method of changing the apartment type doesn't
    262     /// work on some systems for unknown reason (CoUninitialize() simply does
    263     /// nothing there, or at least all 10 000 of subsequent CoInitializeEx()
    264     /// continue to return RPC_E_CHANGED_MODE there). The problem on those
    265     /// systems is related to the "Extend support for advanced text services
    266     /// to all programs" checkbox in the advanced language settings dialog,
    267     /// i.e. the problem appears when this checkbox is checked and disappears
    268     /// if you clear it. For this reason, we disable the code below and
    269     /// instead initialize COM in MTA as early as possible, before 3rd party
    270     /// libraries we use have done so (i.e. Qt).
    271 # if 0
    272     /* If we fail to set the necessary apartment model, it may mean that some
    273      * DLL that was indirectly loaded by the process calling this function has
    274      * already initialized COM on the given thread in an incompatible way
    275      * which we can't leave with. Therefore, we try to fix this by using the
    276      * brute force method: */
    277 
    278     if (rc == RPC_E_CHANGED_MODE)
    279     {
    280         /* Before we use brute force, we need to check if we are in the
    281          * neutral threaded apartment -- in this case there is no need to
    282          * worry at all. */
    283 
    284         rc = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
    285         if (rc == RPC_E_CHANGED_MODE)
    286         {
    287             /* This is a neutral apartment, reset the error */
    288             rc = S_OK;
    289 
    290             LogFlowFunc(("COM is already initialized in neutral threaded "
    291                          "apartment mode,\nwill accept it.\n"));
    292         }
    293         else if (rc == S_FALSE)
    294         {
    295             /* balance the test CoInitializeEx above */
    296             CoUninitialize();
    297             rc = RPC_E_CHANGED_MODE;
    298 
    299             LogFlowFunc(("COM is already initialized in single threaded "
    300                          "apartment mode,\nwill reinitialize as "
    301                          "multi threaded.\n"));
    302 
    303             enum { MaxTries = 10000 };
    304             int tries = MaxTries;
    305             while (rc == RPC_E_CHANGED_MODE && tries --)
    306             {
    307                 CoUninitialize();
    308                 rc = CoInitializeEx(NULL, flags);
    309                 if (rc == S_OK)
    310                 {
    311                     /* We've successfully reinitialized COM; restore the
    312                      * initialization reference counter */
    313 
    314                     LogFlowFunc(("Will call CoInitializeEx() %d times.\n",
    315                                  MaxTries - tries));
    316 
    317                     while (tries ++ < MaxTries)
    318                     {
    319                         rc = CoInitializeEx(NULL, flags);
    320                         Assert(rc == S_FALSE);
    321                     }
    322                 }
    323             }
    324         }
    325         else
    326             AssertMsgFailed(("rc=%08X\n", rc));
    327     }
    328 # endif
    329272
    330273    /* the overall result must be either S_OK or S_FALSE (S_FALSE means
     
    342285    else
    343286        fRc = false;
     287
     288    if (fGui)
     289           Assert(RTThreadIsMain(hSelf));
     290
    344291    if (!fRc)
    345292    {
     
    359306
    360307#else /* !defined (VBOX_WITH_XPCOM) */
     308
     309     /* Unused here */
     310    (void)fGui;
    361311
    362312    if (ASMAtomicXchgBool(&gIsXPCOMInitialized, true) == true)
  • trunk/src/VBox/Main/idl/comimpl.xsl

    r34393 r35638  
    6767  </xsl:variable>
    6868
    69   <xsl:value-of select="concat('        COM_INTERFACE_ENTRY(', $name, ')&#10;')" />
     69  <xsl:value-of select="concat('        VBOX_DEFAULT_INTERFACE_ENTRIES(', $name, ')&#10;')" />
    7070  <xsl:choose>
    7171    <xsl:when test="$extends='$unknown'">
    72       <xsl:value-of select="   '        COM_INTERFACE_ENTRY(IDispatch)&#10;'" />
     72      <!-- Reached base -->
    7373    </xsl:when>
    7474    <xsl:when test="//interface[@name=$extends]">
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r34101 r35638  
    6868
    6969    BEGIN_COM_MAP(Appliance)
    70         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    71         COM_INTERFACE_ENTRY(IAppliance)
    72         COM_INTERFACE_ENTRY(IDispatch)
     70        VBOX_DEFAULT_INTERFACE_ENTRIES(IAppliance)
    7371    END_COM_MAP()
    7472
     
    8381
    8482    // public initializer/uninitializer for internal purposes only
    85     HRESULT FinalConstruct() { return S_OK; }
    86     void FinalRelease() { uninit(); }
     83    HRESULT FinalConstruct() { return BaseFinalConstruct(); }
     84    void FinalRelease() { uninit(); BaseFinalRelease(); }
    8785
    8886    HRESULT init(VirtualBox *aVirtualBox);
     
    252250
    253251    BEGIN_COM_MAP(VirtualSystemDescription)
    254         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    255         COM_INTERFACE_ENTRY(IVirtualSystemDescription)
    256         COM_INTERFACE_ENTRY(IDispatch)
     252        VBOX_DEFAULT_INTERFACE_ENTRIES(IVirtualSystemDescription)
    257253    END_COM_MAP()
    258254
     
    260256
    261257    // public initializer/uninitializer for internal purposes only
    262     HRESULT FinalConstruct() { return S_OK; }
    263     void FinalRelease() { uninit(); }
     258    HRESULT FinalConstruct() { return BaseFinalConstruct(); }
     259    void FinalRelease() { uninit(); BaseFinalRelease(); }
    264260
    265261    HRESULT init();
  • trunk/src/VBox/Main/include/AudioAdapterImpl.h

    r30764 r35638  
    5050
    5151    BEGIN_COM_MAP(AudioAdapter)
    52         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    53         COM_INTERFACE_ENTRY(IAudioAdapter)
    54         COM_INTERFACE_ENTRY(IDispatch)
     52        VBOX_DEFAULT_INTERFACE_ENTRIES(IAudioAdapter)
    5553    END_COM_MAP()
    5654
  • trunk/src/VBox/Main/include/BIOSSettingsImpl.h

    r30764 r35638  
    4242
    4343    BEGIN_COM_MAP(BIOSSettings)
    44         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    45         COM_INTERFACE_ENTRY(IBIOSSettings)
    46         COM_INTERFACE_ENTRY(IDispatch)
     44        VBOX_DEFAULT_INTERFACE_ENTRIES(IBIOSSettings)
    4745    END_COM_MAP()
    4846
  • trunk/src/VBox/Main/include/BandwidthControlImpl.h

    r34589 r35638  
    4040
    4141    BEGIN_COM_MAP(BandwidthControl)
    42         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    43         COM_INTERFACE_ENTRY(IBandwidthControl)
    44         COM_INTERFACE_ENTRY(IDispatch)
     42        VBOX_DEFAULT_INTERFACE_ENTRIES(IBandwidthControl)
    4543    END_COM_MAP()
    4644
  • trunk/src/VBox/Main/include/BandwidthGroupImpl.h

    r34587 r35638  
    3434
    3535    BEGIN_COM_MAP(BandwidthGroup)
    36         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    37         COM_INTERFACE_ENTRY(IBandwidthGroup)
    38         COM_INTERFACE_ENTRY(IDispatch)
     36        VBOX_DEFAULT_INTERFACE_ENTRIES(IBandwidthGroup)
    3937    END_COM_MAP()
    4038
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r35460 r35638  
    9898
    9999    BEGIN_COM_MAP(Console)
    100         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    101         COM_INTERFACE_ENTRY(IConsole)
    102         COM_INTERFACE_ENTRY(IDispatch)
     100        VBOX_DEFAULT_INTERFACE_ENTRIES(IConsole)
    103101    END_COM_MAP()
    104102
     
    756754    }
    757755    mCallbackData;
    758     COM_STRUCT_OR_CLASS(IEventListener) *mVmListner;
     756    COM_STRUCT_OR_CLASS(IEventListener) *mVmListener;
    759757
    760758    friend struct VMTask;
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r35374 r35638  
    242242
    243243    BEGIN_COM_MAP(VRDEServerInfo)
    244         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    245         COM_INTERFACE_ENTRY(IVRDEServerInfo)
    246         COM_INTERFACE_ENTRY(IDispatch)
     244        VBOX_DEFAULT_INTERFACE_ENTRIES(IVRDEServerInfo)
    247245    END_COM_MAP()
    248246
  • trunk/src/VBox/Main/include/DHCPServerImpl.h

    r30764 r35638  
    4545
    4646    BEGIN_COM_MAP (DHCPServer)
    47         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    48         COM_INTERFACE_ENTRY (IDHCPServer)
    49         COM_INTERFACE_ENTRY (IDispatch)
     47        VBOX_DEFAULT_INTERFACE_ENTRIES(IDHCPServer)
    5048    END_COM_MAP()
    5149
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r35346 r35638  
    109109
    110110    BEGIN_COM_MAP(Display)
    111         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    112         COM_INTERFACE_ENTRY(IDisplay)
    113         COM_INTERFACE_ENTRY2(IDispatch,IDisplay)
     111        VBOX_DEFAULT_INTERFACE_ENTRIES(IDisplay)
    114112        COM_INTERFACE_ENTRY(IEventListener)
    115113    END_COM_MAP()
  • trunk/src/VBox/Main/include/EventImpl.h

    r34402 r35638  
    3434
    3535    BEGIN_COM_MAP(VBoxEvent)
    36         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    37         COM_INTERFACE_ENTRY(IEvent)
    38         COM_INTERFACE_ENTRY(IDispatch)
     36        VBOX_DEFAULT_INTERFACE_ENTRIES(IEvent)
    3937    END_COM_MAP()
    4038
     
    7674
    7775    BEGIN_COM_MAP(VBoxVetoEvent)
    78         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    7976        COM_INTERFACE_ENTRY2(IEvent, IVetoEvent)
    80         COM_INTERFACE_ENTRY(IVetoEvent)
    81         COM_INTERFACE_ENTRY2(IDispatch, IVetoEvent)
     77        VBOX_DEFAULT_INTERFACE_ENTRIES(IVetoEvent)
    8278    END_COM_MAP()
    8379
     
    140136
    141137    BEGIN_COM_MAP(EventSource)
    142         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    143         COM_INTERFACE_ENTRY(IEventSource)
    144         COM_INTERFACE_ENTRY(IDispatch)
     138        VBOX_DEFAULT_INTERFACE_ENTRIES(IEventSource)
    145139    END_COM_MAP()
    146140
  • trunk/src/VBox/Main/include/ExtPackManagerImpl.h

    r35523 r35638  
    3737    DECLARE_PROTECT_FINAL_CONSTRUCT()
    3838    BEGIN_COM_MAP(ExtPackFile)
    39         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    40         COM_INTERFACE_ENTRY(IExtPackFile)
     39        VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackFile)
    4140        COM_INTERFACE_ENTRY(IExtPackBase)
    42         COM_INTERFACE_ENTRY(IDispatch)
    4341    END_COM_MAP()
    4442    DECLARE_EMPTY_CTOR_DTOR(ExtPackFile)
     
    102100    DECLARE_PROTECT_FINAL_CONSTRUCT()
    103101    BEGIN_COM_MAP(ExtPack)
    104         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    105         COM_INTERFACE_ENTRY(IExtPack)
     102        VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPack)
    106103        COM_INTERFACE_ENTRY(IExtPackBase)
    107         COM_INTERFACE_ENTRY(IDispatch)
    108104    END_COM_MAP()
    109105    DECLARE_EMPTY_CTOR_DTOR(ExtPack)
     
    193189    DECLARE_PROTECT_FINAL_CONSTRUCT()
    194190    BEGIN_COM_MAP(ExtPackManager)
    195         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    196         COM_INTERFACE_ENTRY(IExtPackManager)
    197         COM_INTERFACE_ENTRY(IDispatch)
     191        VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackManager)
    198192    END_COM_MAP()
    199193    DECLARE_EMPTY_CTOR_DTOR(ExtPackManager)
  • trunk/src/VBox/Main/include/FramebufferImpl.h

    r30714 r35638  
    3939
    4040    BEGIN_COM_MAP (Framebuffer)
    41         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    42         COM_INTERFACE_ENTRY (IFramebuffer)
    43         COM_INTERFACE_ENTRY (IDispatch)
     41        VBOX_DEFAULT_INTERFACE_ENTRIES (IFramebuffer)
    4442    END_COM_MAP()
    4543
  • trunk/src/VBox/Main/include/GuestImpl.h

    r35456 r35638  
    5959
    6060    BEGIN_COM_MAP(Guest)
    61         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    62         COM_INTERFACE_ENTRY(IGuest)
    63         COM_INTERFACE_ENTRY(IDispatch)
     61        VBOX_DEFAULT_INTERFACE_ENTRIES(IGuest)
    6462    END_COM_MAP()
    6563
  • trunk/src/VBox/Main/include/GuestOSTypeImpl.h

    r33447 r35638  
    3636
    3737    BEGIN_COM_MAP(GuestOSType)
    38         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    39         COM_INTERFACE_ENTRY(IGuestOSType)
    40         COM_INTERFACE_ENTRY(IDispatch)
     38        VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestOSType)
    4139    END_COM_MAP()
    4240
  • trunk/src/VBox/Main/include/HostImpl.h

    r35429 r35638  
    4646
    4747    BEGIN_COM_MAP(Host)
    48         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    49         COM_INTERFACE_ENTRY(IHost)
    50         COM_INTERFACE_ENTRY(IDispatch)
     48        VBOX_DEFAULT_INTERFACE_ENTRIES(IHost)
    5149    END_COM_MAP()
    5250
  • trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h

    r30739 r35638  
    4343
    4444    BEGIN_COM_MAP (HostNetworkInterface)
    45         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    46         COM_INTERFACE_ENTRY (IHostNetworkInterface)
    47         COM_INTERFACE_ENTRY (IDispatch)
     45        VBOX_DEFAULT_INTERFACE_ENTRIES(IHostNetworkInterface)
    4846    END_COM_MAP()
    4947
  • trunk/src/VBox/Main/include/HostUSBDeviceImpl.h

    r33540 r35638  
    181181
    182182    BEGIN_COM_MAP(HostUSBDevice)
    183         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    184         COM_INTERFACE_ENTRY(IHostUSBDevice)
     183        VBOX_DEFAULT_INTERFACE_ENTRIES(IHostUSBDevice)
    185184        COM_INTERFACE_ENTRY(IUSBDevice)
    186         COM_INTERFACE_ENTRY(IDispatch)
    187185    END_COM_MAP()
    188186
  • trunk/src/VBox/Main/include/KeyboardImpl.h

    r35346 r35638  
    5858
    5959    BEGIN_COM_MAP(Keyboard)
    60         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    61         COM_INTERFACE_ENTRY(IKeyboard)
    62         COM_INTERFACE_ENTRY(IDispatch)
     60        VBOX_DEFAULT_INTERFACE_ENTRIES(IKeyboard)
    6361    END_COM_MAP()
    6462
  • trunk/src/VBox/Main/include/MachineDebuggerImpl.h

    r35506 r35638  
    3838
    3939    BEGIN_COM_MAP(MachineDebugger)
    40         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    41         COM_INTERFACE_ENTRY (IMachineDebugger)
    42         COM_INTERFACE_ENTRY (IDispatch)
     40        VBOX_DEFAULT_INTERFACE_ENTRIES (IMachineDebugger)
    4341    END_COM_MAP()
    4442
  • trunk/src/VBox/Main/include/MachineImpl.h

    r35460 r35638  
    318318
    319319    BEGIN_COM_MAP(Machine)
    320         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    321         COM_INTERFACE_ENTRY(IMachine)
    322         COM_INTERFACE_ENTRY(IDispatch)
     320        VBOX_DEFAULT_INTERFACE_ENTRIES(IMachine)
    323321    END_COM_MAP()
    324322
     
    903901
    904902    BEGIN_COM_MAP(SessionMachine)
    905         COM_INTERFACE_ENTRY2(IDispatch, IMachine)
    906         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    907         COM_INTERFACE_ENTRY(IMachine)
     903        VBOX_DEFAULT_INTERFACE_ENTRIES(IMachine)
    908904        COM_INTERFACE_ENTRY(IInternalMachineControl)
    909905    END_COM_MAP()
     
    11141110
    11151111    BEGIN_COM_MAP(SnapshotMachine)
    1116         COM_INTERFACE_ENTRY2(IDispatch, IMachine)
    1117         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    1118         COM_INTERFACE_ENTRY(IMachine)
     1112        VBOX_DEFAULT_INTERFACE_ENTRIES(IMachine)
    11191113    END_COM_MAP()
    11201114
  • trunk/src/VBox/Main/include/MediumAttachmentImpl.h

    r34587 r35638  
    3434
    3535    BEGIN_COM_MAP(MediumAttachment)
    36         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    37         COM_INTERFACE_ENTRY(IMediumAttachment)
    38         COM_INTERFACE_ENTRY(IDispatch)
     36        VBOX_DEFAULT_INTERFACE_ENTRIES(IMediumAttachment)
    3937    END_COM_MAP()
    4038
  • trunk/src/VBox/Main/include/MediumFormatImpl.h

    r33524 r35638  
    7676
    7777    BEGIN_COM_MAP(MediumFormat)
    78         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    79         COM_INTERFACE_ENTRY(IMediumFormat)
    80         COM_INTERFACE_ENTRY(IDispatch)
     78        VBOX_DEFAULT_INTERFACE_ENTRIES(IMediumFormat)
    8179    END_COM_MAP()
    8280
  • trunk/src/VBox/Main/include/MediumImpl.h

    r35252 r35638  
    5151
    5252    BEGIN_COM_MAP(Medium)
    53         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    54         COM_INTERFACE_ENTRY(IMedium)
    55         COM_INTERFACE_ENTRY(IDispatch)
     53        VBOX_DEFAULT_INTERFACE_ENTRIES(IMedium)
    5654    END_COM_MAP()
    5755
  • trunk/src/VBox/Main/include/MouseImpl.h

    r35346 r35638  
    4747
    4848    BEGIN_COM_MAP(Mouse)
    49         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    50         COM_INTERFACE_ENTRY  (IMouse)
    51         COM_INTERFACE_ENTRY2 (IDispatch, IMouse)
     49        VBOX_DEFAULT_INTERFACE_ENTRIES(IMouse)
    5250    END_COM_MAP()
    5351
  • trunk/src/VBox/Main/include/NATEngineImpl.h

    r33825 r35638  
    7474
    7575    BEGIN_COM_MAP(NATEngine)
    76         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    77         COM_INTERFACE_ENTRY  (INATEngine)
    78         COM_INTERFACE_ENTRY2 (IDispatch, INATEngine)
     76        VBOX_DEFAULT_INTERFACE_ENTRIES (INATEngine)
    7977    END_COM_MAP()
    8078
  • trunk/src/VBox/Main/include/NetworkAdapterImpl.h

    r31287 r35638  
    7979
    8080    BEGIN_COM_MAP(NetworkAdapter)
    81         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    82         COM_INTERFACE_ENTRY  (INetworkAdapter)
    83         COM_INTERFACE_ENTRY2 (IDispatch, INetworkAdapter)
     81        VBOX_DEFAULT_INTERFACE_ENTRIES (INetworkAdapter)
    8482    END_COM_MAP()
    8583
  • trunk/src/VBox/Main/include/ParallelPortImpl.h

    r30764 r35638  
    3939
    4040    BEGIN_COM_MAP(ParallelPort)
    41         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    42         COM_INTERFACE_ENTRY  (IParallelPort)
    43         COM_INTERFACE_ENTRY2 (IDispatch, IParallelPort)
     41        VBOX_DEFAULT_INTERFACE_ENTRIES (IParallelPort)
    4442    END_COM_MAP()
    4543
  • trunk/src/VBox/Main/include/PciDeviceAttachmentImpl.h

    r34331 r35638  
    3535
    3636    BEGIN_COM_MAP(PciAddress)
    37         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    38         COM_INTERFACE_ENTRY(IPciAddress)
    39         COM_INTERFACE_ENTRY(IDispatch)
     37        VBOX_DEFAULT_INTERFACE_ENTRIES(IPciAddress)
    4038    END_COM_MAP()
    4139
     
    9997
    10098    BEGIN_COM_MAP(PciDeviceAttachment)
    101         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    102         COM_INTERFACE_ENTRY(IPciDeviceAttachment)
    103         COM_INTERFACE_ENTRY(IDispatch)
     99        VBOX_DEFAULT_INTERFACE_ENTRIES(IPciDeviceAttachment)
    104100    END_COM_MAP()
    105101
  • trunk/src/VBox/Main/include/PerformanceImpl.h

    r30764 r35638  
    5858
    5959    BEGIN_COM_MAP (PerformanceMetric)
    60         COM_INTERFACE_ENTRY (IPerformanceMetric)
    61         COM_INTERFACE_ENTRY (IDispatch)
     60        VBOX_DEFAULT_INTERFACE_ENTRIES (IPerformanceMetric)
    6261    END_COM_MAP()
    6362
     
    126125
    127126    BEGIN_COM_MAP(PerformanceCollector)
    128         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    129         COM_INTERFACE_ENTRY(IPerformanceCollector)
    130         COM_INTERFACE_ENTRY(IDispatch)
     127        VBOX_DEFAULT_INTERFACE_ENTRIES(IPerformanceCollector)
    131128    END_COM_MAP()
    132129
  • trunk/src/VBox/Main/include/ProgressCombinedImpl.h

    r33540 r35638  
    7777
    7878    BEGIN_COM_MAP (CombinedProgress)
    79         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    80         COM_INTERFACE_ENTRY  (IProgress)
    81         COM_INTERFACE_ENTRY2 (IDispatch, IProgress)
     79        VBOX_DEFAULT_INTERFACE_ENTRIES  (IProgress)
    8280    END_COM_MAP()
    8381
  • trunk/src/VBox/Main/include/ProgressImpl.h

    r33540 r35638  
    143143
    144144    BEGIN_COM_MAP (Progress)
    145         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    146         COM_INTERFACE_ENTRY  (IProgress)
    147         COM_INTERFACE_ENTRY2 (IDispatch, IProgress)
     145        VBOX_DEFAULT_INTERFACE_ENTRIES (IProgress)
    148146    END_COM_MAP()
    149147
  • trunk/src/VBox/Main/include/ProgressProxyImpl.h

    r30739 r35638  
    3838
    3939    BEGIN_COM_MAP(ProgressProxy)
    40         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    41         COM_INTERFACE_ENTRY (IProgress)
    42         COM_INTERFACE_ENTRY2(IDispatch, IProgress)
     40        VBOX_DEFAULT_INTERFACE_ENTRIES (IProgress)
    4341    END_COM_MAP()
    4442
  • trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h

    r33004 r35638  
    4040
    4141    BEGIN_COM_MAP (RemoteUSBDevice)
    42         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    4342        COM_INTERFACE_ENTRY  (IHostUSBDevice)
    44         COM_INTERFACE_ENTRY  (IUSBDevice)
    45         COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice)
     43        VBOX_DEFAULT_INTERFACE_ENTRIES  (IUSBDevice)
    4644    END_COM_MAP()
    4745
  • trunk/src/VBox/Main/include/SerialPortImpl.h

    r30764 r35638  
    4242
    4343    BEGIN_COM_MAP(SerialPort)
    44         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    45         COM_INTERFACE_ENTRY  (ISerialPort)
    46         COM_INTERFACE_ENTRY2 (IDispatch, ISerialPort)
     44        VBOX_DEFAULT_INTERFACE_ENTRIES (ISerialPort)
    4745    END_COM_MAP()
    4846
  • trunk/src/VBox/Main/include/SessionImpl.h

    r34587 r35638  
    3434#endif
    3535
     36#ifdef RT_OS_WINDOWS
     37[threading(free)]
     38#endif
    3639class ATL_NO_VTABLE Session :
    3740    public VirtualBoxBase,
     
    5457
    5558    BEGIN_COM_MAP(Session)
    56         COM_INTERFACE_ENTRY2(IDispatch, ISession)
     59        VBOX_DEFAULT_INTERFACE_ENTRIES(ISession)
    5760        COM_INTERFACE_ENTRY2(IDispatch, IInternalSessionControl)
    5861        COM_INTERFACE_ENTRY(IInternalSessionControl)
    59         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    60         COM_INTERFACE_ENTRY(ISession)
    6162    END_COM_MAP()
    6263
  • trunk/src/VBox/Main/include/SharedFolderImpl.h

    r33708 r35638  
    4848
    4949    BEGIN_COM_MAP(SharedFolder)
    50         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    51         COM_INTERFACE_ENTRY  (ISharedFolder)
    52         COM_INTERFACE_ENTRY2 (IDispatch, ISharedFolder)
     50        VBOX_DEFAULT_INTERFACE_ENTRIES  (ISharedFolder)
    5351    END_COM_MAP()
    5452
  • trunk/src/VBox/Main/include/SnapshotImpl.h

    r31539 r35638  
    4444
    4545    BEGIN_COM_MAP(Snapshot)
    46         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    47         COM_INTERFACE_ENTRY  (ISnapshot)
    48         COM_INTERFACE_ENTRY2 (IDispatch, ISnapshot)
     46        VBOX_DEFAULT_INTERFACE_ENTRIES  (ISnapshot)
    4947    END_COM_MAP()
    5048
  • trunk/src/VBox/Main/include/StorageControllerImpl.h

    r34010 r35638  
    3636
    3737    BEGIN_COM_MAP(StorageController)
    38         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    39         COM_INTERFACE_ENTRY  (IStorageController)
    40         COM_INTERFACE_ENTRY2 (IDispatch, IStorageController)
     38        VBOX_DEFAULT_INTERFACE_ENTRIES (IStorageController)
    4139    END_COM_MAP()
    4240
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r34244 r35638  
    4646
    4747    BEGIN_COM_MAP(SystemProperties)
    48         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    49         COM_INTERFACE_ENTRY(ISystemProperties)
    50         COM_INTERFACE_ENTRY2(IDispatch, ISystemProperties)
     48        VBOX_DEFAULT_INTERFACE_ENTRIES (ISystemProperties)
    5149    END_COM_MAP()
    5250
  • trunk/src/VBox/Main/include/USBControllerImpl.h

    r30764 r35638  
    4343
    4444    BEGIN_COM_MAP(USBController)
    45         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    46         COM_INTERFACE_ENTRY  (IUSBController)
    47         COM_INTERFACE_ENTRY2 (IDispatch, IUSBController)
     45        VBOX_DEFAULT_INTERFACE_ENTRIES (IUSBController)
    4846    END_COM_MAP()
    4947
  • trunk/src/VBox/Main/include/USBDeviceFilterImpl.h

    r31892 r35638  
    7474
    7575    BEGIN_COM_MAP(USBDeviceFilter)
    76         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    77         COM_INTERFACE_ENTRY  (IUSBDeviceFilter)
    78         COM_INTERFACE_ENTRY2 (IDispatch, IUSBDeviceFilter)
     76        VBOX_DEFAULT_INTERFACE_ENTRIES  (IUSBDeviceFilter)
    7977    END_COM_MAP()
    8078
     
    180178
    181179    BEGIN_COM_MAP(HostUSBDeviceFilter)
    182         COM_INTERFACE_ENTRY(IDispatch)
    183         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    184180        COM_INTERFACE_ENTRY(IUSBDeviceFilter)
    185         COM_INTERFACE_ENTRY(IHostUSBDeviceFilter)
     181        VBOX_DEFAULT_INTERFACE_ENTRIES(IHostUSBDeviceFilter)
    186182    END_COM_MAP()
    187183
  • trunk/src/VBox/Main/include/USBDeviceImpl.h

    r30739 r35638  
    3939
    4040    BEGIN_COM_MAP(OUSBDevice)
    41         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    42         COM_INTERFACE_ENTRY  (IUSBDevice)
    43         COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice)
     41        VBOX_DEFAULT_INTERFACE_ENTRIES (IUSBDevice)
    4442    END_COM_MAP()
    4543
  • trunk/src/VBox/Main/include/VFSExplorerImpl.h

    r33461 r35638  
    3434
    3535    BEGIN_COM_MAP(VFSExplorer)
    36         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    37         COM_INTERFACE_ENTRY(IVFSExplorer)
    38         COM_INTERFACE_ENTRY(IDispatch)
     36        VBOX_DEFAULT_INTERFACE_ENTRIES(IVFSExplorer)
    3937    END_COM_MAP()
    4038
     
    4240
    4341    // public initializer/uninitializer for internal purposes only
    44     HRESULT FinalConstruct() { return S_OK; }
    45     void FinalRelease() { uninit(); }
     42    HRESULT FinalConstruct() { return BaseFinalConstruct(); }
     43    void FinalRelease() { uninit(); BaseFinalRelease(); }
    4644
    4745    HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
  • trunk/src/VBox/Main/include/VRDEServerImpl.h

    r35146 r35638  
    5151
    5252    BEGIN_COM_MAP(VRDEServer)
    53         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    54         COM_INTERFACE_ENTRY  (IVRDEServer)
    55         COM_INTERFACE_ENTRY2 (IDispatch, IVRDEServer)
     53        VBOX_DEFAULT_INTERFACE_ENTRIES(IVRDEServer)
    5654    END_COM_MAP()
    5755
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r35420 r35638  
    638638#endif
    639639{
     640protected:
     641#ifdef RT_OS_WINDOWS
     642     CComPtr <IUnknown>   m_pUnkMarshaler;
     643#endif
     644
     645     HRESULT   BaseFinalConstruct()
     646     {
     647#ifdef RT_OS_WINDOWS
     648        return   CoCreateFreeThreadedMarshaler(this, //GetControllingUnknown(),
     649                                               &m_pUnkMarshaler.p);
     650#else
     651        return S_OK;
     652#endif
     653     }
     654
     655     void   BaseFinalRelease()
     656     {
     657#ifdef RT_OS_WINDOWS
     658         m_pUnkMarshaler.Release();
     659#endif
     660     }
     661
     662
    640663public:
    641664    enum State { NotReady, Ready, InInit, InUninit, InitFailed, Limited };
  • trunk/src/VBox/Main/include/VirtualBoxClientImpl.h

    r35135 r35638  
    4646
    4747    BEGIN_COM_MAP(VirtualBoxClient)
    48         COM_INTERFACE_ENTRY2(IDispatch, IVirtualBoxClient)
    49         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    50         COM_INTERFACE_ENTRY(IVirtualBoxClient)
     48        VBOX_DEFAULT_INTERFACE_ENTRIES(IVirtualBoxClient)
    5149    END_COM_MAP()
    5250
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r35608 r35638  
    5757    struct MediaRegistry;
    5858}
    59 
    6059class ATL_NO_VTABLE VirtualBox :
    6160    public VirtualBoxBase,
     
    8382
    8483    BEGIN_COM_MAP(VirtualBox)
    85         COM_INTERFACE_ENTRY2(IDispatch, IVirtualBox)
    86         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    87         COM_INTERFACE_ENTRY(IVirtualBox)
     84        VBOX_DEFAULT_INTERFACE_ENTRIES(IVirtualBox)
    8885    END_COM_MAP()
    8986
  • trunk/src/VBox/Main/src-all/EventImpl.cpp

    r35368 r35638  
    8686{
    8787    m = new Data;
    88     return S_OK;
     88    return BaseFinalConstruct();
    8989}
    9090
     
    9696        delete m;
    9797        m = 0;
     98        BaseFinalRelease();
    9899    }
    99100}
     
    911912{
    912913    m = new Data;
    913     return S_OK;
     914    return BaseFinalConstruct();
    914915}
    915916
     
    918919    uninit();
    919920    delete m;
     921    BaseFinalRelease();
    920922}
    921923
     
    11841186
    11851187    BEGIN_COM_MAP(PassiveEventListener)
    1186         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    1187         COM_INTERFACE_ENTRY(IEventListener)
    1188         COM_INTERFACE_ENTRY(IDispatch)
     1188        VBOX_DEFAULT_INTERFACE_ENTRIES(IEventListener)
    11891189    END_COM_MAP()
    11901190
     
    11961196    HRESULT FinalConstruct()
    11971197    {
    1198         return S_OK;
     1198        return BaseFinalConstruct();
    11991199    }
    12001200    void FinalRelease()
    1201     {}
     1201    {
     1202        BaseFinalRelease();
     1203    }
    12021204
    12031205    // IEventListener methods
     
    12241226
    12251227    BEGIN_COM_MAP(ProxyEventListener)
    1226         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    1227         COM_INTERFACE_ENTRY(IEventListener)
    1228         COM_INTERFACE_ENTRY(IDispatch)
     1228        VBOX_DEFAULT_INTERFACE_ENTRIES(IEventListener)
    12291229    END_COM_MAP()
    12301230
     
    12361236    HRESULT FinalConstruct()
    12371237    {
    1238         return S_OK;
     1238        return BaseFinalConstruct();
    12391239    }
    12401240    void FinalRelease()
    1241     {}
     1241    {
     1242        BaseFinalRelease();
     1243    }
    12421244
    12431245    HRESULT init(IEventSource* aSource)
     
    12791281
    12801282    BEGIN_COM_MAP(EventSourceAggregator)
    1281         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    1282         COM_INTERFACE_ENTRY(IEventSource)
    1283         COM_INTERFACE_ENTRY(IDispatch)
     1283        VBOX_DEFAULT_INTERFACE_ENTRIES(IEventSource)
    12841284    END_COM_MAP()
    12851285
     
    12911291    HRESULT FinalConstruct()
    12921292    {
    1293         return S_OK;
     1293        return BaseFinalConstruct();
    12941294    }
    12951295    void FinalRelease()
     
    12981298        mListenerProxies.clear();
    12991299        mSource->uninit();
     1300        BaseFinalRelease();
    13001301    }
    13011302
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r35523 r35638  
    212212{
    213213    m = NULL;
    214     return S_OK;
     214    return BaseFinalConstruct();
    215215}
    216216
     
    331331{
    332332    uninit();
     333    BaseFinalRelease();
    333334}
    334335
  • trunk/src/VBox/Main/src-all/PciDeviceAttachmentImpl.cpp

    r35368 r35638  
    5050{
    5151    LogFlowThisFunc(("\n"));
    52     return S_OK;
     52    return BaseFinalConstruct();
    5353}
    5454
     
    5757    LogFlowThisFunc(("\n"));
    5858    uninit();
     59    BaseFinalRelease();
    5960}
    6061
  • trunk/src/VBox/Main/src-all/ProgressImpl.cpp

    r35368 r35638  
    8282    m_pvCancelUserArg = NULL;
    8383
    84     return S_OK;
     84    return BaseFinalConstruct();
    8585}
    8686
     
    593593{
    594594    uninit();
     595    BaseFinalRelease();
    595596}
    596597
     
    12441245    mCompletedOperations = 0;
    12451246
    1246     return S_OK;
     1247    return BaseFinalConstruct();
    12471248}
    12481249
     
    12501251{
    12511252    uninit();
     1253    BaseFinalRelease();
    12521254}
    12531255
  • trunk/src/VBox/Main/src-all/SharedFolderImpl.cpp

    r35368 r35638  
    4545HRESULT SharedFolder::FinalConstruct()
    4646{
    47     return S_OK;
     47    return BaseFinalConstruct();
    4848}
    4949
     
    5151{
    5252    uninit();
     53    BaseFinalRelease();
    5354}
    5455
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r35563 r35638  
    379379    mpVmm2UserMethods = pVmm2UserMethods;
    380380
    381     return S_OK;
     381    return BaseFinalConstruct();
    382382}
    383383
     
    387387
    388388    uninit();
     389   
     390    BaseFinalRelease();
    389391}
    390392
     
    486488        rc = pVirtualBox->COMGETTER(EventSource)(pES.asOutParam());
    487489        AssertComRC(rc);
    488         mVmListner = new VmEventListenerImpl(this);
     490        mVmListener = new VmEventListenerImpl(this);
    489491        com::SafeArray<VBoxEventType_T> eventTypes;
    490492        eventTypes.push_back(VBoxEventType_OnNATRedirect);
    491         rc = pES->RegisterListener(mVmListner, ComSafeArrayAsInParam(eventTypes), true);
     493        rc = pES->RegisterListener(mVmListener, ComSafeArrayAsInParam(eventTypes), true);
    492494        AssertComRC(rc);
    493495    }
     
    525527
    526528    LogFlowThisFunc(("initFailed()=%d\n", autoUninitSpan.initFailed()));
    527     if (mVmListner)
     529    if (mVmListener)
    528530    {
    529531        ComPtr<IEventSource> pES;
     
    537539            if (!pES.isNull())
    538540            {
    539                 rc = pES->UnregisterListener(mVmListner);
    540                 AssertComRC(rc);
     541                rc = pES->UnregisterListener(mVmListener);
     542                // XXX: for some reasons we're getting VBOX_E_OBJECT_NOT_FOUND
     543                // here - investigate
     544                //AssertComRC(rc);
    541545            }
    542546        }
    543         mVmListner->Release();
     547        mVmListener->Release();
     548        mVmListener = 0;
    544549    }
    545550
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r35368 r35638  
    24112411HRESULT VRDEServerInfo::FinalConstruct()
    24122412{
    2413     return S_OK;
     2413    return BaseFinalConstruct();
    24142414}
    24152415
     
    24172417{
    24182418    uninit();
     2419    BaseFinalRelease();
    24192420}
    24202421
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r35633 r35638  
    124124#endif
    125125
    126     return S_OK;
     126    return BaseFinalConstruct();
    127127}
    128128
     
    136136        memset (&mVBVALock, 0, sizeof (mVBVALock));
    137137    }
     138    BaseFinalRelease();
    138139}
    139140
  • trunk/src/VBox/Main/src-client/GuestImpl.cpp

    r35368 r35638  
    4444HRESULT Guest::FinalConstruct()
    4545{
    46     return S_OK;
     46    return BaseFinalConstruct();
    4747}
    4848
     
    5050{
    5151    uninit ();
     52    BaseFinalRelease();
    5253}
    5354
  • trunk/src/VBox/Main/src-client/KeyboardImpl.cpp

    r35368 r35638  
    8282    mpVMMDev = NULL;
    8383    mfVMMDevInited = false;
    84     return S_OK;
     84    return BaseFinalConstruct();
    8585}
    8686
     
    8888{
    8989    uninit();
     90    BaseFinalRelease();
    9091}
    9192
  • trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp

    r35586 r35638  
    5656{
    5757    unconst(mParent) = NULL;
    58     return S_OK;
     58    return BaseFinalConstruct();
    5959}
    6060
     
    6262{
    6363    uninit();
     64    BaseFinalRelease();
    6465}
    6566
  • trunk/src/VBox/Main/src-client/MouseImpl.cpp

    r35368 r35638  
    7979    mfLastButtons = 0;
    8080    mfVMMDevGuestCaps = 0;
    81     return S_OK;
     81    return BaseFinalConstruct();
    8282}
    8383
     
    8585{
    8686    uninit();
     87    BaseFinalRelease();
    8788}
    8889
  • trunk/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp

    r35368 r35638  
    3838HRESULT RemoteUSBDevice::FinalConstruct()
    3939{
    40     return S_OK;
     40    return BaseFinalConstruct();
    4141}
    4242
     
    4444{
    4545    uninit();
     46    BaseFinalRelease();
    4647}
    4748
  • trunk/src/VBox/Main/src-client/SessionImpl.cpp

    r35368 r35638  
    5757    LogFlowThisFunc(("\n"));
    5858
    59     return init();
     59    HRESULT rc = init();
     60   
     61    BaseFinalConstruct();
     62 
     63    return rc;
    6064}
    6165
     
    6569
    6670    uninit();
     71     
     72    BaseFinalRelease();
    6773}
    6874
     
    182188    HRESULT rc;
    183189    if (mConsole)
    184         rc = mConsole->machine().queryInterfaceTo(aMachine);
     190       rc = mConsole->machine().queryInterfaceTo(aMachine);
    185191    else
    186         rc = mRemoteMachine.queryInterfaceTo(aMachine);
     192       rc = mRemoteMachine.queryInterfaceTo(aMachine);   
    187193    if (FAILED(rc))
    188194    {
     
    215221    else
    216222        rc = mRemoteConsole.queryInterfaceTo(aConsole);
     223
    217224    if (FAILED(rc))
    218225    {
  • trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp

    r35368 r35638  
    3030HRESULT OUSBDevice::FinalConstruct()
    3131{
    32     return S_OK;
     32    return BaseFinalConstruct();
    3333}
    3434
     
    3636{
    3737    uninit ();
     38    BaseFinalRelease();
    3839}
    3940
  • trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp

    r35368 r35638  
    4242HRESULT VirtualBoxClient::FinalConstruct()
    4343{
    44     return init();
     44    HRESULT rc = init();
     45    BaseFinalConstruct();
     46    return rc;
    4547}
    4648
     
    4850{
    4951    uninit();
     52    BaseFinalRelease();
    5053}
    5154
  • trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp

    r35368 r35638  
    4141HRESULT AudioAdapter::FinalConstruct()
    4242{
    43     return S_OK;
     43    return BaseFinalConstruct();
    4444}
    4545
     
    4747{
    4848    uninit();
     49    BaseFinalRelease();
    4950}
    5051
  • trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp

    r35368 r35638  
    5151HRESULT BIOSSettings::FinalConstruct()
    5252{
    53     return S_OK;
     53    return BaseFinalConstruct();
    5454}
    5555
     
    5757{
    5858    uninit ();
     59    BaseFinalRelease();
    5960}
    6061
  • trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp

    r35368 r35638  
    5656HRESULT BandwidthControl::FinalConstruct()
    5757{
    58     return S_OK;
     58    return BaseFinalConstruct();
    5959}
    6060
     
    6262{
    6363    uninit();
     64    BaseFinalRelease();
    6465}
    6566
  • trunk/src/VBox/Main/src-server/BandwidthGroupImpl.cpp

    r35368 r35638  
    6464HRESULT BandwidthGroup::FinalConstruct()
    6565{
    66     return S_OK;
     66    return BaseFinalConstruct();
    6767}
    6868
     
    7070{
    7171    uninit();
     72    BaseFinalRelease();
    7273}
    7374
  • trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp

    r35368 r35638  
    4343HRESULT DHCPServer::FinalConstruct()
    4444{
    45     return S_OK;
     45    return BaseFinalConstruct();
    4646}
    4747
     
    4949{
    5050    uninit ();
     51
     52    BaseFinalRelease();
    5153}
    5254
  • trunk/src/VBox/Main/src-server/GuestOSTypeImpl.cpp

    r35368 r35638  
    4646HRESULT GuestOSType::FinalConstruct()
    4747{
    48     return S_OK;
     48    return BaseFinalConstruct();
    4949}
    5050
     
    5252{
    5353    uninit();
     54   
     55    BaseFinalRelease();
    5456}
    5557
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r35429 r35638  
    221221HRESULT Host::FinalConstruct()
    222222{
    223     return S_OK;
     223    return BaseFinalConstruct();
    224224}
    225225
     
    227227{
    228228    uninit();
     229    BaseFinalRelease();
    229230}
    230231
  • trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp

    r35368 r35638  
    4343HRESULT HostNetworkInterface::FinalConstruct()
    4444{
    45     return S_OK;
     45    return BaseFinalConstruct();
    4646}
    4747
     
    4949{
    5050    uninit ();
     51    BaseFinalRelease();
    5152}
    5253
  • trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp

    r35368 r35638  
    4040    mUsb = NULL;
    4141
    42     return S_OK;
     42    return BaseFinalConstruct();
    4343}
    4444
     
    4646{
    4747    uninit();
     48    BaseFinalRelease();
    4849}
    4950
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r35610 r35638  
    235235{
    236236    LogFlowThisFunc(("\n"));
    237     return S_OK;
     237    return BaseFinalConstruct();
    238238}
    239239
     
    242242    LogFlowThisFunc(("\n"));
    243243    uninit();
     244    BaseFinalRelease();
    244245}
    245246
     
    99449945#endif
    99459946
    9946     return S_OK;
     9947    return BaseFinalConstruct();
    99479948}
    99489949
     
    99529953
    99539954    uninit(Uninit::Unexpected);
     9955
     9956    BaseFinalRelease();
    99549957}
    99559958
  • trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp

    r35368 r35638  
    7878{
    7979    LogFlowThisFunc(("\n"));
    80     return S_OK;
     80    return BaseFinalConstruct();
    8181}
    8282
     
    8585    LogFlowThisFuncEnter();
    8686    uninit();
     87    BaseFinalRelease();
    8788    LogFlowThisFuncLeave();
    8889}
  • trunk/src/VBox/Main/src-server/MediumFormatImpl.cpp

    r35368 r35638  
    3232HRESULT MediumFormat::FinalConstruct()
    3333{
    34     return S_OK;
     34    return BaseFinalConstruct();
    3535}
    3636
     
    3838{
    3939    uninit();
     40   
     41    BaseFinalRelease();
    4042}
    4143
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r35553 r35638  
    897897    AssertRCReturn(vrc, E_FAIL);
    898898
    899     return S_OK;
     899    return BaseFinalConstruct();
    900900}
    901901
     
    905905
    906906    delete m;
     907
     908    BaseFinalRelease();
    907909}
    908910
  • trunk/src/VBox/Main/src-server/NATEngineImpl.cpp

    r35577 r35638  
    101101    unconst(mParent) = aParent;
    102102    autoInitSpan.setSucceeded();
    103     return S_OK;
     103    return BaseFinalConstruct();
    104104}
    105105
     
    108108{
    109109    uninit();
     110    BaseFinalRelease();
    110111}
    111112
  • trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp

    r35368 r35638  
    4646{
    4747
    48     return S_OK;
     48    return BaseFinalConstruct();
    4949}
    5050
     
    5252{
    5353    uninit();
     54    BaseFinalRelease();
    5455}
    5556
  • trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp

    r35368 r35638  
    5555HRESULT ParallelPort::FinalConstruct()
    5656{
    57     return S_OK;
     57    return BaseFinalConstruct();
    5858}
    5959
     
    6161{
    6262    uninit();
     63    BaseFinalRelease();
    6364}
    6465
  • trunk/src/VBox/Main/src-server/PerformanceImpl.cpp

    r35368 r35638  
    133133    LogFlowThisFunc(("\n"));
    134134
    135     return S_OK;
     135    return BaseFinalConstruct();
    136136}
    137137
     
    139139{
    140140    LogFlowThisFunc(("\n"));
     141    BaseFinalRelease();
    141142}
    142143
     
    647648    LogFlowThisFunc(("\n"));
    648649
    649     return S_OK;
     650    return BaseFinalConstruct();
    650651}
    651652
     
    655656
    656657    uninit ();
     658
     659    BaseFinalRelease();
    657660}
    658661
  • trunk/src/VBox/Main/src-server/ProgressProxyImpl.cpp

    r35518 r35638  
    135135    muOtherProgressWeight         = 0;
    136136    muOtherProgressStartOperation = 0;
     137
     138    BaseFinalRelease();
    137139}
    138140
  • trunk/src/VBox/Main/src-server/SerialPortImpl.cpp

    r35368 r35638  
    5858HRESULT SerialPort::FinalConstruct()
    5959{
    60     return S_OK;
     60    return BaseFinalConstruct();
    6161}
    6262
     
    6464{
    6565    uninit();
     66    BaseFinalRelease();
    6667}
    6768
  • trunk/src/VBox/Main/src-server/SnapshotImpl.cpp

    r35602 r35638  
    109109{
    110110    LogFlowThisFunc(("\n"));
    111     return S_OK;
     111    return BaseFinalConstruct();
    112112}
    113113
     
    116116    LogFlowThisFunc(("\n"));
    117117    uninit();
     118    BaseFinalRelease();
    118119}
    119120
     
    889890    LogFlowThisFunc(("\n"));
    890891
    891     return S_OK;
     892    return BaseFinalConstruct();
    892893}
    893894
     
    897898
    898899    uninit();
     900 
     901    BaseFinalRelease();
    899902}
    900903
  • trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp

    r35368 r35638  
    105105HRESULT StorageController::FinalConstruct()
    106106{
    107     return S_OK;
     107    return BaseFinalConstruct();
    108108}
    109109
     
    111111{
    112112    uninit();
     113    BaseFinalRelease();
    113114}
    114115
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r35368 r35638  
    6262HRESULT SystemProperties::FinalConstruct()
    6363{
    64     return S_OK;
     64    return BaseFinalConstruct();
    6565}
    6666
     
    6868{
    6969    uninit();
     70    BaseFinalRelease();
    7071}
    7172
  • trunk/src/VBox/Main/src-server/USBControllerImpl.cpp

    r35368 r35638  
    9090HRESULT USBController::FinalConstruct()
    9191{
    92     return S_OK;
     92    return BaseFinalConstruct();
    9393}
    9494
     
    9696{
    9797    uninit();
     98    BaseFinalRelease();
    9899}
    99100
  • trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp

    r35368 r35638  
    187187HRESULT USBDeviceFilter::FinalConstruct()
    188188{
    189     return S_OK;
     189    return BaseFinalConstruct();
    190190}
    191191
     
    193193{
    194194    uninit();
     195    BaseFinalRelease();
    195196}
    196197
  • trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp

    r35368 r35638  
    5656HRESULT VRDEServer::FinalConstruct()
    5757{
    58     return S_OK;
     58    return BaseFinalConstruct();
    5959}
    6060
     
    6262{
    6363    uninit();
     64    BaseFinalRelease();
    6465}
    6566
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r35608 r35638  
    344344    LogFlowThisFunc(("\n"));
    345345
    346     return init();
     346    HRESULT rc = init();
     347   
     348    BaseFinalConstruct();
     349
     350    return rc;
    347351}
    348352
     
    352356
    353357    uninit();
     358
     359    BaseFinalRelease();
    354360}
    355361
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