I have had a need to read INI files directly from memory. An example, would be to load an ini file from a VBin file w/o extracting it to disk, read, then delete the file. This is definately a safer solution if you want to keep your data safer from prying eyes ...
Comes with library and sample below:
Code: Select all
Procedure.s LoadString(FileName.s)
If ReadFile(0,FileName)
While Eof(0) = #False
Text.s + ReadString() + #CRLF$
Wend
CloseFile(0)
ProcedureReturn Text
Else
ProcedureReturn ""
EndIf
EndProcedure
myString.s = LoadString("inimemory.ini")
Debug myString
Result = INIMemory_Parse(myString)
Debug "Result: " + Str(Result)
Debug "All Groups: " + Str(INIMemory_GroupCount())
Debug "All Sections: " + Str(INIMemory_SectionCount(""))
Any questions or bugs, let me know
