Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
ATL
Classes
IDispatchImpl Class

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
ATL Library Reference 
IDispatchImpl Class 

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

template<
   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

Parameters

T

A dual interface.

piid

A pointer to the IID of T.

plibid

A pointer to the LIBID of the type library that contains information about the interface. By default, the server-level type library is passed.

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

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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker