Export (0) Print
Expand All
Expand Minimize

COM_INTERFACE_ENTRY2

Use this macro to disambiguate two branches of inheritance.

COM_INTERFACE_ENTRY2( x, x2 )

x

[in] The name of an interface you want to expose from your object.

x2

[in] The name of the inheritance branch from which x is exposed.

For example, if you derive your class object from two dual interfaces, you expose IDispatch using COM_INTERFACE_ENTRY2 since IDispatch can be obtained from either one of the interfaces.

See COM_INTERFACE_ENTRY Macros for remarks about COM map entries.

class ATL_NO_VTABLE CEntry2Example :
   public CEntry2ExampleBase, // CEntry2ExampleBase derives from IDispatch
   public IDispatchImpl<IEntry2Example, &IID_IEntry2Example, &LIBID_NVC_ATL_WindowingLib, /*wMajor =*/ 1, /*wMinor =*/ 0>,
   public CComCoClass<CEntry2Example, &CLSID_Entry2Example>
{
public:
   CEntry2Example()
   {
   }

BEGIN_COM_MAP(CEntry2Example)
   COM_INTERFACE_ENTRY(IEntry2Example)
   COM_INTERFACE_ENTRY2(IDispatch, IEntry2Example)
END_COM_MAP()
};

Header: atlcom.h

Show:
© 2014 Microsoft