Partager via


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.

Requirements

Header: afxwin.h

See Also

Reference

CCmdTarget Class

Hierarchy Chart

COleControl::IsInvokeAllowed

Other Resources

CCmdTarget Members