Reading bytes from a binary file?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

If I have an offset in hex, say $1000, how can I read the bytes from a binary
file at that offset? Say for example I need to read the first 10 bytes from
the offset of $1000 in an exe, how would I do it?


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

FileSeek(NewPosition)
Number.b = ReadByte()

Getting better with a little help from my friends....thx Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.
FileSeek(NewPosition)
Number.b = ReadByte()
I can't believe I overlooked the ReadByte() command!


PB - Registered PureBasic Coder
Post Reply