VirtualBox

Changeset 60701 in vbox for trunk/include/VBox/com


Ignore:
Timestamp:
Apr 26, 2016 9:42:13 AM (9 years ago)
Author:
vboxsync
Message:

com/array.h+com/listerers.h: cleanups, reduce ATL dependency

Location:
trunk/include/VBox/com
Files:
2 edited

Legend:

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

    r60079 r60701  
    44
    55/*
    6  * Copyright (C) 2006-2015 Oracle Corporation
     6 * Copyright (C) 2006-2016 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    15361536    {
    15371537        NOREF(aVarType);
    1538         return SafeArrayCreateEx(VT_DISPATCH, 1, aBound, (PVOID)&_ATL_IIDOF(I));
     1538        return SafeArrayCreateEx(VT_DISPATCH, 1, aBound, (PVOID)&COM_IIDOF(I));
    15391539    }
    15401540};
     
    16171617            rc = SafeArrayGetIID(arg, &guid);
    16181618            AssertComRCReturnVoid(rc);
    1619             AssertMsgReturnVoid(InlineIsEqualGUID(_ATL_IIDOF(I), guid),
     1619            AssertMsgReturnVoid(InlineIsEqualGUID(COM_IIDOF(I), guid),
    16201620                                ("Expected IID {%RTuuid}, got {%RTuuid}.\n",
    1621                                  &_ATL_IIDOF(I), &guid));
     1621                                 &COM_IIDOF(I), &guid));
    16221622
    16231623            rc = SafeArrayAccessData(arg, (void HUGEP **)&m.raw);
  • trunk/include/VBox/com/listeners.h

    r58110 r60701  
    55
    66/*
    7  * Copyright (C) 2010-2015 Oracle Corporation
     7 * Copyright (C) 2010-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5656template <class T, class TParam = void *>
    5757class ListenerImpl :
    58      public CComObjectRootEx<CComMultiThreadModel>,
     58     public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>,
    5959     VBOX_SCRIPTABLE_IMPL(IEventListener)
    6060{
    61     T*                mListener;
     61    T* mListener;
    6262
    6363#ifdef RT_OS_WINDOWS
    6464    /* FTM stuff */
    65     CComPtr <IUnknown>  m_pUnkMarshaler;
     65    ComPtr<IUnknown> m_pUnkMarshaler;
    6666#else
    6767    nsAutoRefCnt mRefCnt;
     
    103103    {
    104104#ifdef RT_OS_WINDOWS
    105        return CoCreateFreeThreadedMarshaler(this, &m_pUnkMarshaler.p);
     105       return CoCreateFreeThreadedMarshaler(this, &m_pUnkMarshaler.m_p);
    106106#else
    107107       return S_OK;
     
    113113      uninit();
    114114#ifdef RT_OS_WINDOWS
    115       m_pUnkMarshaler.Release();
     115      m_pUnkMarshaler.setNull();
    116116#endif
    117117    }
     
    130130        COM_INTERFACE_ENTRY(IEventListener)
    131131        COM_INTERFACE_ENTRY2(IDispatch, IEventListener)
    132         COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
     132        COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.m_p)
    133133    END_COM_MAP()
    134134#else
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