Show/Hide Toolbars

XSharp

For normal use the logic type is mapped to System.Boolean.

Inside VOSTRUCT and UNION the XSharp.__WinBool is used because this is a 4 byte value just like the Win32 api expects.

 

The LOGIC keyword represents the .Net Boolean type. This type can have either of two values: true, or false.

 

If you have members of type LOGIC in VOSTRUCT or UNION types then these will not be represented with .Net Boolean types because the size of these Boolean is 1 byte but in the Windows API LOGIC values are represented with 4 bytes. Therefore the compiler will replace these with a special type __WinBool which has 4 bytes and has implicit converters between Logic and __WinBool.