You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I send a struct with 3 booleans from C# to C++ with PINVOKE.
There is no example for this.
But you have to add [MarshalAs(UnmanagedType.I1)] to get the right size. Otherwise the values are not correct on the C++ side.
Example:
public struct Bla
{
public float fooFloat;
[MarshalAs(UnmanagedType.I1)] public bool foo1;
[MarshalAs(UnmanagedType.I1)] public bool foo2;
[MarshalAs(UnmanagedType.I1)] public bool foo3;
}
Can you add a example for that in PInvokeLib?
The text was updated successfully, but these errors were encountered:
I send a struct with 3 booleans from C# to C++ with PINVOKE.
There is no example for this.
But you have to add [MarshalAs(UnmanagedType.I1)] to get the right size. Otherwise the values are not correct on the C++ side.
Example:
Can you add a example for that in PInvokeLib?
The text was updated successfully, but these errors were encountered: