Поделиться через


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. For more information, see Implementing the IDispatch Interface.

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

См. также

Основные понятия

COM Map Macros

ATL Macros