Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FifteenWindows/OS Functions (continued)

OLEGetObject Function

Overview

The OLEGetObject function returns an OLE Object handle to a specific OLE server or application.

Syntax/Parameters

Syntax

handle = OLEGetObject ( string type );

Parameters

type

A string specifying the GUID for the specific application or server. For ease of use this function also supports shorthand names. See the Remarks section for more details.

Return Value

Returns a handle to an instance serving the OLE requests or NULL_HANDLE on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

The type parameter is case-sensitive and must specify a CLSID that is accessible to the current computer. For ease of use the following shorter type names are available:

  Text   Description  
  Internet Explorer   Microsoft Internet Explorer. An instance of Internet Explorer is opened as the current user. This Internet Explorer window is hidden by default.  

 

Because of the complexity of many COM objects, Legato provides an easier to use interface for any of the short type values. Any COM object referenced by CLSID can only be accessed with the OLERunMethod function.

Objects returned by this function may persist after the handle is closed or the script has ended. How long the object persists is based on the CLSID and any properties changed by OLERunMethod or other OLE functions.

Upon completion the handle should be closed with the CloseHandle function. Depending on the state of the connected object, it may or may not close. Some groups, such as Internet Explorer, have additional close options such as OLEIEClose.

Related Functions

Platform Support

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

Legato IDE