Interop.BOOLEAN.cs 806 B

123456789101112131415161718192021
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. internal partial class Interop
  5. {
  6. /// <summary>
  7. /// Blittable version of Windows BOOLEAN type. It is convenient in situations where
  8. /// manual marshalling is required, or to avoid overhead of regular bool marshalling.
  9. /// </summary>
  10. /// <remarks>
  11. /// Some Windows APIs return arbitrary integer values although the return type is defined
  12. /// as BOOLEAN. It is best to never compare BOOLEAN to TRUE. Always use bResult != BOOLEAN.FALSE
  13. /// or bResult == BOOLEAN.FALSE .
  14. /// </remarks>
  15. internal enum BOOLEAN : byte
  16. {
  17. FALSE = 0,
  18. TRUE = 1,
  19. }
  20. }