How do I do this?
If I have a structure and a BinaryStream, how do I read from the BinaryStream and place its contents into a struct?
Dim something As UInt32
Dim somethingElse as Single
Dim anotherThing as UInt16
Dim bs as BinaryStream = BinaryStream.Open(f,False)
if f<>Nil then
Dim myStruct as TestStruct
// Get the contents from bs into TestStruct
I don’t want to have to do:
myStruct.something = bs.ReadUInt32
myStruct.somethingElse = bs.ReadSingle
myStruct.anotherThing = bs.ReadUInt16
The struct I am working with has a boat-load of members… there has to be a slick way of doing this in Xojo?