Interop.BOOL.cs 787 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 BOOL 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 BOOL. It is best to never compare BOOL to TRUE. Always use bResult != BOOL.FALSE
  13. /// or bResult == BOOL.FALSE .
  14. /// </remarks>
  15. internal enum BOOL : int
  16. {
  17. FALSE = 0,
  18. TRUE = 1,
  19. }
  20. }