Function: oleobj

Syntax

oleobj( <string> {,<file> {,<atable>}} )

Type

component

Returns

Creates an instance of an external OLE Automation or ActiveX object and returns a pointer to it. The function returns the value null if the object cannot be created. This function is only available on Windows systems.

Parameters

Examples

component myobj = oleobj('MCI.MMControl')

Notes

When passing a parameter to a method of an OLE component, the value passed will be coerced into the OLE type expected by the method. However for a method which expects a type VARIANT of specific VARTYPE, the Fire value may be cast to the VARTYPE as in the following example.

component c = oleobj('MyObj.MyObj')
c.Doit((I4)999)

Permitted casts are as follows: