Repository navigation
Add discussion of platform sensitive struct/union layout - #18087
Conversation
|
This new content applies to both .NET Framework and .NET Core. |
gewarren
left a comment
There was a problem hiding this comment.
Thanks for adding this. I left some grammatical/flow suggestions.
|
Another thing that might be worth mentioning here is that if instead of creating one explicit struct, if you create a sequential structure for STREET with a nested explicit structure with everything at offset 0 that represents the implicit union field, then you don't need two definitions to account for bitness. Alignment considerations should automatically handle layout cross-bitness in that scenario. |
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
…s.md Co-Authored-By: Genevieve Warren <[email protected]>
@jkoritzinsky That could be possible, but that may not be true for COM-RPC. How the structs are defined and that they can be different based on bitness is the intent of this sample. The above workaround could work in some scenarios but it could also fail in others. We should avoid those kind of tricks in official documentation. |
|
Looks good. I'm not sure if you have write permissions, so I'm merging this now. |
Summary
Add discussion for platform sensitive struct/union layout.
/cc @gewarren @danmosemsft @elinor-fung @jkoritzinsky