Sub ReadIni(key As String,fPath As String,filename As String) As Object
Dim Map1 As Map
Dim Rt As Object
'code added for read in file WINDOWS.
Rt = ""
'*********************************
Map1.Initialize
If File.Exists(fPath,filename) Then
Else
File.WriteMap(fPath, filename, Map1) 'to create it if not exist
End If
Map1 = File.ReadMap(fPath,filename)
If Map1.Size = 0 Then
Rt = ""
Else
For i = 0 To Map1.Size - 1
If Map1.GetKeyAt(i) = key Then
Rt = Map1.GetValueAt(i)
Exit
End If
Next
End If
Return Rt
End Sub