Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ThreeData Types and Operators (continued)

MakeHandle Function

Overview

The MakeHandle function takes a string or integer value, processes it, and turns it into a handle.

Syntax/Parameters

Syntax

handle = MakeHandle ( string value | int value );

Parameters

value

As a string, the value is translated from the string representation of the value handle. The value can be in hex as prefixed by ‘0x’, octal as prefixed by ‘0’, or decimal. The string can also be a complex handle with a trailing object type descriptor. Or,

As an int, the value is translated from the 32-bit portion of the value.

Return Value

Returns a handle value or NULL_HANDLE on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

The MakeHandle function is useful for retrieving handles from parameter lists and other data to convert and typecast information in the form of a handle. For example, the MakeHandle function can be useful when reading a menu function response and converting the returned handle to an Information View tab window.

The MakeHandle function is a very mechanical function that simply converts a number into a handle type. It does not test the suitability of the returned value.

The complex type will allow the handle to be registered and used with certain API objects. This is generally how an object can be passed from the parent application to a hook. Not all candidate object handles has tested for quality so caution should be observed. Failure to set up a correct handle type may result in program exception or run time error.

If a complex handle is not provided, handle value is not implied to be any specific type of object or window.

Related Functions

Platform Support

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

Legato IDE, Legato Basic