return *reinterpret_cast<UInt32*>((reinterpret_cast<char*>(this) + 2));
Struct is pragma packed 1 and contains a bunch of uint, char, short fields...
Since it's UInt32, should it first be reinterpret_cast to unsigned char* instead or does it even matter?
Also, speed is critical here and I believe reinterpret_cast is the fastest of the casts as opposed to static_cast.
EDIT: The struct is actually composed of two single-byte fields followed by a union of about 16 other structs 15 of which have the UInt32 as its first field. I do a quick check that it's not the one without and then do the reinterpret_cast to the 2 byte offset.