IniFile

Public Function IniFile(Optional ByVal IniFileName As String) As PolarStudioGlobals.IniFile

Returns an IniFile-object to read from/write to ini files.

Dim mIniFile As IniFile

Private Function GetIniFile() As IniFile
   Using Lock
       If mIniFile Is Nothing Then
           mIniFile = IniFile("C:\Temp\MySettings.Ini")
       End If
   End Using
   
   Return mIniFile
End Function

Public Function GetSettingFromIniFile(pChapterName As String, pSettingName As String) As String
   Return mIniFile.Read(pSettingName, pChapterName)
End Function

Public Function SetSettingToIniFile(pChapterName As String, pSettingName As String, pValue As String)
   Call mIniFile.Write(pSettingName, pValue, pChapterName)
End Function

See also: