Sorry I forgot the INI thing and just thought of the way I would do it
If you use INI you will be bashing the HDD and performance for lots of entries would be quite slow.
Uses "File","INI"
Type tRecord
one As Byte
two As Byte
three As Byte
four As Byte
Txt As String*10
End Type
Dim FileBuffer As String
Dim FileName As String = APP_ScriptPath + "file.ini"
Dim sMsg As String
Dim FirstValue As Byte
' FileBuffer = FILE_Load(FileName)
FileBuffer = String$(SizeOf(tRecord)*10, $SPC)
' This must be called after filling the buffer or you can use REDIM
Dim MyRecord(10) As tRecord At StrPtr(FileBuffer)
MyRecord(1).One = 54
MyRecord(1).two = 55
MyRecord(1).three = 56
MyRecord(1).four = 57
MyRecord(1).txt = "Record 1"
MyRecord(2).txt = "Record 2"
INI_SetKey(FileName, "1", "1", MyRecord(1).One)
INI_SetKey(FileName, "1", "2", MyRecord(1).two)
INI_SetKey(FileName, "1", "3", MyRecord(1).three)
INI_SetKey(FileName, "1", "4", MyRecord(1).four)
INI_SetKey(FileName, "1", "Txt", MyRecord(1).txt)
INI_SetKey(FileName, "FullString", "String", FileBuffer)
As you can see its a lot of work for not much gain, as I said I would just do it without ini its already formatted by the udt you just need to watch the filebuffer is large enough for the array.
Bookmarks