M
Mike R
Hi All,
I'm trying to read a file that has the following format, its a variable
record file, the first byte determines how to process the rest.
byte 1 = either 0,1,2,3
4 bytes = size of the file
other bytes = lots of stuff
I'm bascially stuck on getting the 4 bytes into an int32!
dim myfile as new fileinfo("c:\test.dat")
dim myreader as streamreader
myreader=myfile.opentext
while myreader.peek <>-1
' read the first byte
rType = oread.read()
dim chararray(1) as char
oread.readblock(chararray,0,2)
....This is where i'm stuck - how to get the chararray into an int32. Or am
I approaching this the wrong way
any help my appreciated.
Thanks
Mike
I'm trying to read a file that has the following format, its a variable
record file, the first byte determines how to process the rest.
byte 1 = either 0,1,2,3
4 bytes = size of the file
other bytes = lots of stuff
I'm bascially stuck on getting the 4 bytes into an int32!
dim myfile as new fileinfo("c:\test.dat")
dim myreader as streamreader
myreader=myfile.opentext
while myreader.peek <>-1
' read the first byte
rType = oread.read()
dim chararray(1) as char
oread.readblock(chararray,0,2)
....This is where i'm stuck - how to get the chararray into an int32. Or am
I approaching this the wrong way
any help my appreciated.
Thanks
Mike