Per http://yizhang82.me/pinvoke-union, (at least some) .NET Framework
versions work on structs with Explicit layouts with everything at
FieldOffset(0) (i.e. unions) by copying each field one at a time.
That means that if you have a smaller field after a big one, things can
get trashed.
For safety, put the biggest fields at the end of each union.
Per http://yizhang82.me/pinvoke-union, (at least some) .NET Framework versions work on structs with Explicit layouts with everything at FieldOffset(0) (i.e. unions) by copying each field one at a time.
That means that if you have a smaller field after a big one, things can get trashed.
For safety, put the biggest fields at the end of each union.