I'm a novice VB programmer and am having some issues with binary files (which I've never touched before) and I was hoping you may be able to help with...
I've read a binary file into a byte array and now want to pull out data from this.
I know the following about my format:
- byte position 0 is an ascii Char
- byte position 1,2,3 refers to an unsigned 24 bit (I want to put this in a long)
- bytes poistion 4,5 refers to a signed 16 bit numner ( I want to put this in an integer)
- byte 6 is an ascii char
etc etc
I believe data was written to the file using little endian if that helps.
I obvisouly need to loop through my array but how do I convert the data at the byte position into longs / integers??
Any code to illistrate would be great.
Thanks for you help
I've read a binary file into a byte array and now want to pull out data from this.
I know the following about my format:
- byte position 0 is an ascii Char
- byte position 1,2,3 refers to an unsigned 24 bit (I want to put this in a long)
- bytes poistion 4,5 refers to a signed 16 bit numner ( I want to put this in an integer)
- byte 6 is an ascii char
etc etc
I believe data was written to the file using little endian if that helps.
I obvisouly need to loop through my array but how do I convert the data at the byte position into longs / integers??
Any code to illistrate would be great.
Thanks for you help