هذه المقالة متوفرة أيضا باللغة العربية، اقرأها هنا.
Windows comes with two types that represent a Boolean variable (TRUE or FALSE.) Both represent FALSE if 0 and TRUE if non-zero.
The big difference you need to care when working with that two Booleans is that BOOL defined as int which is 32 bits (4 bytes) on 32-bit environments and 16 bits (2 bytes) on 16-bit environments. BOOLEAN on the other hand, defined as BYTE, which in turn defined as unsigned char. Thus, BOOLEAN only occupies 8 bits (1 byte) from memory.
Although you can convert between them easily, BOOL is much common than BOOLEAN and it is very popular in the Windows API.
Now, the decision is yours!
- A Short Speech about Unions
- Converting between color decimal and hexadecimal representation
- Marshaling Unions
- Journey to the Center of the Database
- BeginPaint/EndPaint or GetDC/ReleaseDC?
- Retrieving Motherboard Serial Number using WMI
- [Stats] 97% of machines run Flash, 74% run Java, and 73% run Silverlight
- Consuming URL Shortening Services – 1click.at