IDispatchImpl

template< class T, const IID* piid, const GUID* plibid, WORD wMajor = 1, WORD wMinor = 0, class tihclass = CComTypeInfoHolder >
class IDispatchImpl : public
T

Parameters

T

A dual interface.

piid

A pointer to the IID of T.

plibid

A pointer to the identifier of T's type library section.

wMajor

The major version of the type library. The default value is 1.

wMinor

The minor version of the type library. The default value is 0.

tihclass

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.

#include <atlcom.h>

Class Members

See Also   ITypeInfo