LPDISPATCH GetIDispatch( BOOL bAddRef );
Return Value
The IDispatch pointer associated with the object.
Parameters
bAddRef
Specifies whether to increment the reference count for the object.
Remarks
Call this member function to retrieve the IDispatch pointer from an automation method that either returns an IDispatch pointer or takes an IDispatch pointer by reference.
For objects that call EnableAutomation in their constructors, making them automation enabled, this function returns a pointer to the Foundation Class implementation of IDispatch that is used by clients who communicate via the IDispatch interface. Calling this function automatically adds a reference to the pointer, so it is not necessary to make a call to IUnknown::AddRef.
CCmdTarget Overview | Class Members | Hierarchy Chart
See Also CCmdTarget::EnableAutomation, COleDispatchDriver, IUnknown::Release