Use this function to retrieve from cache memory the specified INI control group and option string.
GetINIString (Context, Group, Option, Default)
Parameter |
Description |
Context |
(Optional) A name (valid string) associated to a set of INI control groups and options which have been loaded into cache memory. |
Group |
Enter the control group name (valid string) which contains the INI option string to retrieve. |
Option |
Enter the option name (valid string) which contains the INI string value to retrieve. If the control group and option does not contain a string, the system returns a null value. |
Default |
(Optional) Enter the default string value to return from the function instead of the actual control group and option value. |
The function returns one (1) if no error occurs, otherwise a zero (0) is returned.
If you omit the context, the function searches all INI files loaded in memory. If there are multiple control groups and options with the same name, this function returns the first INI control group and option string it finds.
If a context name is present, this function only searches for the control group and option in the set of control groups and options associated with the context name.
Assume an INI file (TEST1.INI) was loaded with the context name, MVV The TEST1.INI file contains this control group and option:
< Control >
Title = MVV’s group/option
In addition, the FSIUSER.INI file contains this control group and option:
< Control >
Title = Test group 1
Plus, the FSISYS.INI file contains this control group and option:
< Control >
Title = FAP entry 1
Based on this scenario, the following table shows and explains several possible results.
Function |
Result |
Explanation |
string_value = GetINIString (,"Control", "Title"); |
The variable string_value now contains this string: Test group 1 |
The function scanned the loaded INI control groups and options. It found the specified control group and option in the FSIUSER.INI first. The FSIUSER.INI set is searched first, followed by the FSISYS.INI set and then any other loaded sets, in order. |
string_value = GetINIString ("MVF", "Control", "Title"); |
The variable string_value now contains this string: MVF’s group/option |
The function scans only the control group and option set associated with the context name MVF. |
string_value = GetINIString ("MVF", "Control", "Title", "Bob’s group/option"); |
The variable string_value now contains this string: MVF’s group/option If Control and Title are not found, string_value is set to: |
The function scans only the control group and option set associated with the context name MVF. |
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices