Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FifteenWindows/OS Functions (continued)

ReplaceModuleResource Function

Overview

The ReplaceModuleResource function finds a specific resource and replaces it with a new resource.

Syntax/Parameters

Syntax

int = ReplaceModuleResource ( string target, int type, string name, handle | string data );

Parameters

target

A string specifying the filename and path for a target module. The module must be an exe or dll file.

type

An int specifying the resource type.

name

A string specifying the name of the resource.

data

A handle or string specifying the source data. If a handle is specified, it must be a Data Object containing the binary data to use as the new resource item. If a string is specified, it must be a filename and path to a file containing the binary data to use as the new resource item.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure.

Remarks

Information specified by the data parameter must match the resource type. Note that internally, resource icon data is broken into individual images of varying resolution. Use the ReplaceModuleIcon function to replace all the icons under a specified name.

The types are as follows:

  Definition   Code   Description  
  RT_CURSOR   1   Cursor Data  
  RT_BITMAP   2   Bitmap Data  
  RT_ICON   3   Icon (single)  
  RT_MENU   4   Menu Resource  
  RT_DIALOG   5   Dialog Resource  
  RT_STRING   6   String Resource  
  RT_FONTDIR   7      
  RT_FONT   8      
  RT_ACCELERATOR   9   Menu Accelerator Table  
  RT_RCDATA   10      
  RT_MESSAGETABLE   11      
  RT_GROUP_CURSOR   12   Group Index for Cursors  
  RT_GROUP_ICON   14   Group Index for Icons  
  RT_VERSION   16   Version Info  
  RT_DLGINCLUDE   17      
  RT_PLUGPLAY   19      
  RT_VXD   20      
  RT_ANICURSOR   21      
  RT_ANIICON   22      
  RT_HTML   23   HTML Data  
  RT_MANIFEST   24   Manifest Data  

The script mast have the appropriate rights to modify the target file. 

Related Functions

Platform Support

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

Legato IDE, Legato Basic