Hello all,
I am reading (get) and writing (put) values from multiple binary files.
I first have to copy a binary file file1.bin to file2.bin and then I append 1 record to file2.bin.
My problem is when I read the following code I am not getting the values I expect:
Dim iFileNo as Integer
Dim bVer as Byte
Dim lNumberOfFiles as Long
Dim lBufferSize as Long
Dim tBuffer as String
FileNum = FreeFile
Open tBinaryFilepath For Binary Access Read Lock Read Write As #FileNum
Get #FileNum, , iFileNo
Get #FileNum, , bVer
Get #FileNum, , lNumberOfFiles
Get #FileNum, , lBufferSize
tBuffer = String(lBufferSize, "")
Get #FileNum, , tBuffer
The only value that is correct is iFileNo. Everything after that is incorrect. For instance bVer should be 1 but comes out as 0. lNumber of Files should be 70 but comes out as 6816000, etc
Any help with this matter is greatly appreciated.
Thank you.