#include <atlstl/automation/multiple_dispatch.hpp>
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. |
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.
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
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.