CCmdTarget::IsInvokeAllowed (MFC)

Switch View :
ScriptFree
MFC Library Reference
CCmdTarget::IsInvokeAllowed

This function is called by MFC's implementation of IDispatch::Invoke to determine if a given automation method (identified by dispid) can be invoked.

virtual BOOL IsInvokeAllowed(
   DISPID dispid 
);

Parameters

dispid
A dispatch ID.

Return Value

TRUE if the method can be invoked, otherwise FALSE.

Remarks

If IsInvokeAllowed returns TRUE, Invoke proceeds to call the method; otherwise, Invoke will fail, returning E_UNEXPECTED.

Derived classes can override this function to return appropriate values (if not overridden, IsInvokeAllowed returns TRUE). See in particular COleControl::IsInvokeAllowed.

See Also

CCmdTarget Overview | Class Members | Hierarchy Chart | COleControl::IsInvokeAllowed