FC_GetRetainImageInfo

 

FC_GetRetainImageInfo - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.32.6.0

Versions:

Current version

Task

Read the additional information that has to be written in the file of a memory image.

Description

The function reads the additional information on a memory image from the file specified and then stores the same in the structure transferred. The additional information is

oThe name of the file,

oThe memory date,

oThe controller type,

oThe size of the retain memory of the controller,

oThe user information,

oThe MD5 hash value and

oThe size of the memory image.

NOTE: The typical runtime of the function in a controller is 50 ms if the retain data file is located on the drive 'ide0:'.

Interface

Input

Data type

Description

i_sRetainImageFileName

STRING[80]

Name of the file whose ProgramIdent is to be compared with the ProgramIdent of the application currently located in the memory. The file name automatically receives the extension .ret. The file may be located in any existing directory of the controller. The file name must not include any special characters or wildcards.

Input/Output

Data type

Description

iq_stInfo

ST_RetainImageInfo

Transfer of additional information (see structure ST_RetainImageInfo).

Return Value

Data type

Description

DINT

0: The additional information was read successfully from the specified file.

-1: The additional information could not be read because the transferred file name is invalid. The file name contains special characters ":", "\" or "/" and wildcards "*" or "?".

-2: The additional information could not be read because the specified directory does not exist.

-3: The additional information could not be read because the specified file name does not exist.

-4: The additional information could not be read because the specified file is not a memory image file of a retain memory.

-5: The additional information could not be read because a general error has been detected in the function FC_GetRetainImageInfo().

Examples

diResult := FC_GetRetainImageInfo(‚karton', stRetainInfo);

The additional information is read from the file 'karton.ret' and then stored in the structure 'stRetainInfo' of the type 'ST_RetainImageInfo'. The file 'karton.ret' is located on the default device 'ide0:'.

diResult := FC_GetRetainImageInfo(‚ide0:\retain\plister', stRetainInfo);

The additional information is read from the file ‚plister.ret’ and stored in the structure 'stRetainInfo' of the type 'ST_RetainImageInfo'. The file 'plister.ret' is located in the directory ‚retain’ on the default device 'ide0:'.

diResult := FC_GetRetainImageInfo(‚remote:ide0:\etikett', stRetainInfo);

The additional information is read from the file 'plister.ret' and stored in the structure 'stRetainInfo' of the type 'ST_RetainImageInfo'. The file 'etikett.ret' is located on the remote device ‚remote:’ in the drive 'ide0:'.