Main Content

invoke

Invoke method on COM object or interface, or display methods

Description

invoke(c) displays methods supported by object or interface c, along with the prototypes for these methods. If the output is empty, then either there are no properties or methods in the object, or MATLAB® cannot read the object type library. For information about the object type library, see your COM vendor documentation.

S = invoke(c,methodName) invokes the method specified by methodName and returns an output value, if any, in a structure array. The method determines the data type of the return value. For a description of how MATLAB converts COM types, see Handle COM Data in MATLAB.

If the method returns a COM interface, then the invoke function returns a new MATLAB COM object that represents the interface.

S = invoke(c,methodName,arg1,...,argN) invokes methodName with input arguments arg1,...,argN.

Input Arguments

collapse all

COM object or interface, specified as a function handle.

Object method name, specified as a string or a character vector.

Method input arguments, 1 through N (if any), required by methodName, specified by any type. The method argument list specifies the argument type.

Version History

Introduced before R2006a