PureBasic to Xojo

How are you reading the header in the first place? How are you getting those byte values?