Method call
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The following syntax describes either a basic assignment (=)
statement for invoking a COM object method that returns a value or the basic
statement for invoking a COM object method directly that ignores any returned
value:
Syntax
|
|
- field
- Any ABL variable, database field, class-based data member or property,
or handle attribute of a compatible data type. This can also be a
COMobject property (see COMProperty). - Com-Handle-Var
- Any
COM-HANDLEvariable set to the handle of an instantiatedCOMobject. - Method-Name
- The name of the method to invoke.
- param
- The following syntax describes how to specify a parameter for a
COMobject method:{ [ OUTPUT | INPUT-OUTPUT ] expression [ AS Data-type ] [ BY-POINTER | BY-VARIANT-POINTER ] }- expression
- Can be any valid ABL expression or data element.
- Data-type
- A supported COM data type that is compatible with the expression. For information on COM data types and on
OUTPUT,INPUT-OUTPUT,BY-POINTER, andBY-VARIANT-POINTER, see Data-type.
There is currently no support for named parameters, for example: Method-Name
(Color="GREEN", Shape="SQUARE").If a parameter is optional you may omit it from the parameter list, but you still need to retain the comma to indicate its position. For example,
ComObject:ComMethod(param1,param2,,,param5). - NO-ERROR
- Allows the application to handle any error condition raised by the statement.
Note: You can optionally chain
COM object references.