redeexpressos
compile-time `IntrPtr` size for union-like structs with `FieldOffset`
also https://www.meziantou.net/stop-using-intptr-for-dealing-with-system-handles.htm:
SafeHandles are well-integrated with P/Invoke. You can use SafeHandle-derived class in the definition of the method instead of IntPtr, so they are strongly-typed.
20 replies
compile-time `IntrPtr` size for union-like structs with `FieldOffset`
I was looking at this: https://github.com/KodrAus/rust-csharp-ffi/blob/master/dotnet/Db.Storage/Native/Bindings.cs#L59
20 replies