AR INI Manager ActiveX Library 2.0

This library will allow you to manage INI files in a very simple way. Just with a few methods you will be able to read, write and list the whole contents of INI files in an object oriented way.

History:

The classes included in this library are:

ARINIManager
This is the main classe you have to use. From this one you can access all the rest of the classes in this library.
Properties:
  • INIFile as String. Path to the .ini file you want to open.
  • Sections as clsSections. This property takes you to a clsSections class, which is a collection of the sections that the .ini file has.
  • Size as Long. Physical size of the .ini file.
Methods:
  • GetValue (Section As String, Key As String, [Default As String]) As String. This method is provided as a shortcut to get a direct value.
  • Refresh. Updates the contents of the library by reloading the .ini file.
  • WriteValue (Section As String, Key As String, Value As String) As Boolean. This method is provided as a shortcut to write a value. Returns True if successful, or False otherwise.

 

clsSections
This object contains a collection of the sections in the .ini file.
Properties:
  • Count as Long. Number of sections.
  • Item (Index) as clsSection. Index can be a number or the name of a section. This property takes to a clsSection object.
Methods:
  • Add (Name as String) as Boolean. Adds a new section to the .ini file. Returns True if successful or False otherwise.
  • Remove (Name as String) as Boolean. Removes a section from the .ini file, and all of its values, if any. Returns True if successful or False if an error ocurred.

 

clsValues
This object contains a collection of values under a certain section.
Properties:
  • Count as Long. Number of values in the collection.
  • Item (Index) as clsValue. Index can be a number or the name of a value. This property takes you to a clsValue object.
Methods:
  • Add (Name As String, Value As String) As Boolean. Adds a new value to the section. Returns True if successful.
  • Remove (Name As String) As Boolean. Removes a value from the section. Returns True if successful.

 

clsSection clsValue
Properties:
  • Name as String.
  • Values as clsValues.
Properties:
  • Name as String.
  • Value as String.

 

(16 Kb)

 

© Alvaro Redondo, 1998. All Rights Reserved.
http://www.sevillaonline.com/ActiveX/