IniFileRead

Top  Previous  Next

Prototype

 

StrValue:=IniFileRead (FileName, strSection, strKey, strDefault)

 

Description

 

Reads a value from file with 'INI' extension, to the section and parameter specified.

 

Parameters

 

FileName: A string containing a valid path and filename for the INI file.

 

StrSection: string that represents the section of INI file to read.

 

StrKey: string that represents the parameter inside the section you need to read.

 

StrDefault: string that may be returned in case the file doesn't contain the section or the parameter that one is trying to read.

 

Returned value

 

StrValue: string that corresponds to the value of the suitable parameter.

 

Notes

 

None.

 

Example

 

// Read a value from ini file

OutputDir:=IniFileRead('mysettings.ini','Output','Dir','c:\temp\');