cyberbiker
Programmer
This is a bit of a general description. The code involved in the
whole situation is quite extensive. I can provide more information
if necessary, but I suspect I am overlooking some basic premise
in reading a binary file
I am trying to read a binary file with Visual Basic.
This binary file is a parameter file from a program written in PASCAL.
First the program will read an ASCII text "driver file". From that
I determine the the parameter in the binary file along with
other information I need to process, create an appropriate control "on
the fly" and place all the information in a user defined type.
At this point I determine the length of the field from the data type
of the parameter as declared in the "driver file".
I keep a counter and add the length of the field to the counter each time
determine the offset of the next record starting at "1" instead of "0"
example:
header field is always 8 bytes therefore the start position of the
first needed field is always 9
length of first applicable record = 2 bytes
offset for second field then will be 11
I then read this array, placing the control on the proper tab and
frame.
Things work perfectly up to this point
I then read the binary file using "Get" It seems to work fine
through the first 12 parameters no matter what data type. Then,
after that, it breaks down, somehow. Obviously I am breaking down
in the offset but why?
Terry (cyberbiker)
whole situation is quite extensive. I can provide more information
if necessary, but I suspect I am overlooking some basic premise
in reading a binary file
I am trying to read a binary file with Visual Basic.
This binary file is a parameter file from a program written in PASCAL.
First the program will read an ASCII text "driver file". From that
I determine the the parameter in the binary file along with
other information I need to process, create an appropriate control "on
the fly" and place all the information in a user defined type.
At this point I determine the length of the field from the data type
of the parameter as declared in the "driver file".
I keep a counter and add the length of the field to the counter each time
determine the offset of the next record starting at "1" instead of "0"
example:
header field is always 8 bytes therefore the start position of the
first needed field is always 9
length of first applicable record = 2 bytes
offset for second field then will be 11
I then read this array, placing the control on the proper tab and
frame.
Things work perfectly up to this point
I then read the binary file using "Get" It seems to work fine
through the first 12 parameters no matter what data type. Then,
after that, it breaks down, somehow. Obviously I am breaking down
in the offset but why?
Terry (cyberbiker)