Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SixteenApplication (continued)

RegistryGetString Function

Overview

The RegistryGetString function returns the value as specified by the key location and name as a string.

Syntax/Parameters

Syntax

string = RegistryGetString ( string key, string name );

Parameters

key

A string containing the name of the key to access.

name

A string containing the name of the value to access. If the value is an empty string, the default value for the key is returned.

Return Value

A string containing the data or empty on failure. Since an empty string can be returned, the last error must be checked using the GetLastError or IsError functions.

Typical underlying errors codes are ERROR_PATH_NOT_FOUND (3) when the key is not found and ERROR_FILE_NOT_FOUND (2) and the value name is not found.

Remarks

The maximum size of the return string is 2MB characters.

The underlying data within the registry is always UNICODE and will be down converted to ANSI. This may result in the loss of character data.

If the data type is not a string, it will be converted to a string, if possible. For example, a dword type will be converted to hex. If the data cannot be converted, ERROR_CONTEXT will be returned as the error code.

The script/user must have access rights to the specified key and value.

Related Functions

Platform Support

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

Legato IDE, Legato Basic