COM_invoke
Invoke method on COM object or interface.
📝Syntax
S = invoke(h, methodname, arg1, arg2, ...)
S = COM_invoke(h, methodname, arg1, arg2, ...)
📥Input Arguments
Parameter Description
h a COM object.
methodname a string: the method name invoked on COM object.
arg1, arg2, ... a Nelson variable of type double, int, boolean, string, ... used as parameters of COM function invoked.
📤Output Arguments
Parameter Description
S a COM object or data.
📄Description

If the method returns a COM interface, then ole_invoke returns a new COM object that represents the returned interface.

💡Examples
pWord = actxserver('Word.Application')
pWord.Visible = true
invoke(pWord, 'Quit')
delete(pWord)
clear pWord
🔗See Also
COM_getCOM_set
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub