Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FifteenWindows/OS Functions (continued)

OLERunMethod Function

Overview

The OLERunMethod function runs a specific OLE method or command on an OLE object.

Syntax/Parameters

Syntax

var = OLERunMethod ( handle hOLE, string method, ... );

Parameters

hOLE

A handle to an open OLE Object connection.

method

A string specifying a defined OLE method. See Remarks.

(args)

A list of various parameters of varying types depending on the method and OLE Object. The total amount allowed is limited to 14.

Return Value

Returns an var as a type as specified by the OLE processor. Use the GetLastError, IsError or IsNotError function to determine if the function succeeded.

Assuming the OLE method was run, the last error value will contain the VT_ code (see table at the start of the section). Retrieving this code can be useful to determine the type of data being returned by the server.

Remarks

OLERunMethod provides a generic pipeline to an OLE object. The method parameter must be known to the connected object. Note that the OLEGetProperty and OLEPutProperty functions are very similar in that a specific method of verb is communicated to the OLE server.

The return value is dependent on the method parameter and the connected OLE Object. The type may be: handle, string, wstring, any integer based type, or float. It is up to the developer to insure that the return type is correct such that the script will not encounter a runtime type mismatch error. For strings, the OLE default type is VT_BSTR which is returned as a wstring type.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE