This documentation is archived and is not being maintained.

IDispatchImpl Class

This class provides a default implementation for IDispatch portion of a dual interface.

   class T,
   const IID* piid= &__uuidof(T),
   const GUID* plibid = &CAtlModule::m_libid,
   WORD wMajor = 1,
   WORD wMinor = 0,
   class tihclass = CComTypeInfoHolder 
class ATL_NO_VTABLE IDispatchImpl :
   public T


A dual interface.
A pointer to the IID of T.
A pointer to the LIBID of the type library that contains information about the interface. By default, the server-level type library is passed.
The major version of the type library. The default value is 1.
The minor version of the type library. The default value is 0.
The class used to manage the type information for T. The default value is CComTypeInfoHolder.


IDispatchImpl provides a default implementation for the IDispatch portion of any dual interface on your object. A dual interface derives from IDispatch and uses only Automation-compatible types. Like a dispinterface, a dual interface supports early and late binding; however, a dual interface differs in that it also supports vtable binding.

The following example shows a typical implementation of IDispatchImpl:

class CBeeper :
      public IDispatchImpl< IBeeper, &IID_IBeeper, 
         &LIBID_BeeperLib >,
      public CComObjectRoot,
      public CComCoClass< CBeeper, &CLSID_Beeper >

IDispatchImpl contains a static member of type CComTypeInfoHolder that manages the type information for the dual interface. If you have multiple objects implementing the same dual interface, only a single instance of CComTypeInfoHolder will be used.


Header: atlcom.h

See Also

Class Members | ATL Class Overview