Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Using COM Objects in ABL : Accessing COM object properties and methods : Property and method syntax : Method reference
 
Method reference
This is the syntax for a COM object method reference:

Syntax

[ NO-RETURN-VALUE ]
COMhdl-expression:Method-Name-Reference
NO-RETURN-VALUE
Required for some methods that do not have a return value.
NO-RETURN-VALUE prevents ABL from expecting a possible return value. This option is appropriate only if the method does not have a return value. Whether a method call requires this option depends on the COM object. Some COM objects require that the caller knows there is no return value. In this case, you must specify the option. Many more robust COM objects do not require this option.
If the method requires NO-RETURN-VALUE and you don't specify it, the COM object generally returns an error. For example, Word for Windows 95 Version 7.0 returns an error similar to "Non-function called as function."
Note: If the method has a return value, you must not invoke it in a statement with the NO-RETURN-VALUE option. In this case, ignore the return value without specifying this option, as in the second call to the SetDate() method.
COMhdl-expression
An expression that returns a component handle to the COM object that owns the method specified by Method-Name-Reference.
Method-Name-Reference
Specifies a single COM object method that might return a value.