Method AutomationObject():callMethod() Foundation
Calls a method.
:callMethod( <cName> | <nID> [, <xParam, ...>] ) --> xValue
The data type of the result is defined by the method that is called. In case a method is called which is not known to the COM/ActiveX component, a runtime error occurs.
:callMethod() is used to call a method of an ActiveX component.
Normally, :callMethod() need not be called directly by applications. Instead, COM/ActiveX methods can be called similar to a normal Xbase++ method.
is equivalent to
When methods are called, then Xbase++ data types are automatically converted to/from COM/ActiveX data types as needed.
Xbase++ | COM/ActiveX | Remark |
---|---|---|
A | VT_ARRAY | See Note below |
M | VT_BSTR | |
C | VT_BSTR | |
C | VT_I1 | The length of the string is 1 |
C | VT_UI1 | The length of the string is 1 |
U | VT_NULL | |
U | VT_ERROR | Omitted optional parameter |
L | VT_BOOL | |
D | VT_DATE | |
O | VT_DISPATCH | Xbase++ object of class AutomationObject |
N | VT_INT | |
N | VT_UINT | |
N | VT_I2 | |
N | VT_UI2 | |
N | VT_I4 | |
N | VT_UI4 | |
N | VT_I8 | |
N | VT_UI8 | |
N | VT_R4 | |
N | VT_R8 | |
N | VT_CY | |
N | VT_DECIMAL | |
ANY | VT_VARIANT |
When the COM/ActiveX component does not provide information about what type is to be used in a method call or as a property value then conversion is done according following table:
Xbase++ | COM/ActiveX |
---|---|
A | VT_ARRAY |
C | VT_BSTR |
U | VT_NULL |
L | VT_BOOL |
D | VT_DATE |
O | VT_DISPATCH |
N | VT_I4 *) |
N | VT_R8 *) |
|
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.