It is common in windows API to have a "sizeof" field in a struct (usually called dwSize) for versioning. I believe metadata can introduce a new [SizeOf] attribute or similar and annotate such fields with it. Generators using metadata can then account for that attribute and automatically assign right value to the annotated field. For instance, CsWin32 can do that in a friendly function overload