IDispatchImpl4 Class Template Reference
[COM Automation Library]

#include <atlstl/automation/multiple_dispatch.hpp>

List of all members.


Detailed Description

template<typename I0, IID const * IID0, typename I1, IID const * IID1, typename I2, IID const * IID2, typename I3, IID const * IID3, GUID const * LibID>
class atlstl::IDispatchImpl4< I0, IID0, I1, IID1, I2, IID2, I3, IID3, LibID >

Class template that enables the methods and properties exhibited through four IDispatch interfaces to be visible to scripting clients.

IDispatchImpl4 is used (and operates) in exactly the same way as IDispatchImpl3, except that it supports four dispinterfaces, rather than three.

Public Types

Member Types
typedef IDispatchImpl< I0,
IID0, LibID > 
dispatch_parent_0_type
 The type of the first dispinterface.
typedef IDispatchImpl< I1,
IID1, LibID > 
dispatch_parent_1_type
 The type of the second dispinterface.
typedef IDispatchImpl< I2,
IID2, LibID > 
dispatch_parent_2_type
 The type of the third dispinterface.
typedef IDispatchImpl< I3,
IID3, LibID > 
dispatch_parent_3_type
 The type of the fourth dispinterface.

Protected Member Functions

IDispatch methods
HRESULT GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid)
 Provides the required behaviour of IDispatch::GetIDsOfNames(), by querying the four dispinterfaces, in order, to match the name(s).
HRESULT Invoke (DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr)
 Provides the required behaviour of IDispatch::Invoke(), by invoking this method on the requisite dispinterface.


Member Typedef Documentation

typedef IDispatchImpl<I0, IID0, LibID> dispatch_parent_0_type

The type of the first dispinterface.

typedef IDispatchImpl<I1, IID1, LibID> dispatch_parent_1_type

The type of the second dispinterface.

typedef IDispatchImpl<I2, IID2, LibID> dispatch_parent_2_type

The type of the third dispinterface.

typedef IDispatchImpl<I3, IID3, LibID> dispatch_parent_3_type

The type of the fourth dispinterface.


Member Function Documentation

HRESULT GetIDsOfNames ( REFIID  riid,
LPOLESTR *  rgszNames,
UINT  cNames,
LCID  lcid,
DISPID *  rgdispid 
) [inline, protected]

Provides the required behaviour of IDispatch::GetIDsOfNames(), by querying the four dispinterfaces, in order, to match the name(s).

This method operates by first determining which, if any, of the four parent dispinterfaces can resolve the names. If successful, the resultant dispatch Ids are then striped with a bit in their most-significant byte(s) to record the index of the dispinterface which has thus undertaken to interpret them. This stripe is then detected

Remarks:
Names are matched en bloc: they are either all matched by one interface, or all by the other. It is never the case that some part are matched by one and the remainder by the other.
Note:
If a dispid returned from a successful call to one of the underlying dispinterfaces' GetIDsOfNames() already uses the striping bit, it is left alone. Such methods will be successfully called in Invoke(), in its post-stripe processing.

References ATLSTL_MESSAGE_ASSERT.

HRESULT Invoke ( DISPID  dispidMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdispparams,
VARIANT *  pvarResult,
EXCEPINFO *  pexcepinfo,
UINT *  puArgErr 
) [inline, protected]

Provides the required behaviour of IDispatch::Invoke(), by invoking this method on the requisite dispinterface.

This method operates by detecting the striping bit on the dispid, from which the appropriate dispiniterface is determined. The stripe is then removed, and the method invoked.

Remarks:
Names are matched en bloc: they are either all matched by one interface, or all by the other. It is never the case that some part are matched by one and the remainder by the other.
Note:
If no striping is apparent, the invocation is conducted on each interface in turn.


The documentation for this class was generated from the following file:

Generated on Thu Jun 10 08:58:24 2010 for STLSoft by  doxygen 1.5.6