INI.GetStrings

Top  Previous  Next

 

Syntax

function INI.GetStrings(INIFile: pointer): string

 

Alternative Names

ibec_ini_GetStrings

 

Description

This function Returns the complete contents of the INIFile as a single string.

 

See also

INI.Create
INI.Open

 

Example

execute udsblock(filepath varchar(500))

returns(valueout varchar(2000), valueoutint integer, valueoutdouble double precision)

as

begin

  /* create in memory INI */

  myini = INI.Create();

  

  /* set the filename and save it empty */

  INI.SaveToFile(myini, filepath || 'new_ini_file.ini');

 

  INI.WriteString(myini, 'section1', 'value1', '1');

  INI.WriteString(myini, 'section1', 'value2', '2');

  INI.WriteString(myini, 'section2', 'value1', '1');

  INI.WriteString(myini, 'section2', 'value2', '2');

 

  /* update the file on disk */

  INI.UpdateFile(myini);

  INI.Free(myini);

    

  /* re-open the file */

  myini = INI.Open(filepath || 'new_ini_file.ini');        

  

  /* return entire contents */

  valueout = INI.GetStrings(myini);

 

  INI.Free(myini);

end