-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idiomatic bool marshalling #63
Comments
@sotteson1, does the Win32 API ever use the native |
I'm not sure why we would use the System.Boolean, as BOOL in Win32 is simply an 32-bit int. Using a NativeTypedef struct for the Win32 BOOL seems to be closer to the spirit of what the Win32 BOOL is. |
Thanks for chiming in, @sotteson1. I guess for proper interop on the CLR and better C# language experience, we can change all references from |
I just tried replacing all uses of |
Win32
BOOL
should be represented as[MarshalAs(UnmanagedType.Bool)] bool
. Cbool
should be represented as[MarshalAs(UnmanagedType.U1)] bool
.Source: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1414?view=vs-2019
The text was updated successfully, but these errors were encountered: