Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Using COM Objects in ABL : Accessing COM object properties and methods : Specifying options for properties and method parameters : Using data-type specifiers for method parameters
Using data-type specifiers for method parameters
For a method parameter, you can also use a data-type specifier from Table 60. For COM objects that do not have Type Library definitions and yet require that the data type of the parameter be passed properly, you must specify the data type for the method call to succeed. For example:
myObject:SaveMoney(1000.9999 AS CURRENCY).
In addition, you can use the BY-POINTER or BY-VARIANT-POINTER type option to indicate that the parameter is to be passed as a pointer. For example:
myObject:SaveMoneyPtr(1000.9999 AS CURRENCY BY-POINTER).
A pointer is a value that contains the memory location of the data item you are referencing. BY-POINTER specifies a pointer to the data item value. BY-VARIANT-POINTER specifies a Variant that contains a pointer to another Variant that stores the actual value.
Note: A Variant is a self-describing COM data type. It contains both the data and an indication of its effective data type.
Both the BY-POINTER and BY-VARIANT-POINTER options have no affect on the value of the parameter. They only affect how the data is packaged when the method is dispatched to the COM object. The type option to use, if any, is determined by the method implementation. You can determine the type options required for each parameter from the OpenEdge COM Object Viewer (see Locating COM object information on your system).