CCmdTarget::GetIDispatch
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.
LPDISPATCH GetIDispatch(
BOOL bAddRef
);
Параметры
- bAddRef
Specifies whether to increment the reference count for the object.
Возвращаемое значение
The IDispatch pointer associated with the object.
Заметки
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.
Требования
Header: afxwin.h