summaryrefslogtreecommitdiff
path: root/src/mscorlib/corefx/Interop/Windows/Interop.BOOL.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/corefx/Interop/Windows/Interop.BOOL.cs')
-rw-r--r--src/mscorlib/corefx/Interop/Windows/Interop.BOOL.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mscorlib/corefx/Interop/Windows/Interop.BOOL.cs b/src/mscorlib/corefx/Interop/Windows/Interop.BOOL.cs
new file mode 100644
index 0000000000..9f4dab8935
--- /dev/null
+++ b/src/mscorlib/corefx/Interop/Windows/Interop.BOOL.cs
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+internal partial class Interop
+{
+ /// <summary>
+ /// Blittable version of Windows BOOL type. It is convenient in situations where
+ /// manual marshalling is required, or to avoid overhead of regular bool marshalling.
+ /// </summary>
+ /// <remarks>
+ /// Some Windows APIs return arbitrary integer values although the return type is defined
+ /// as BOOL. It is best to never compare BOOL to TRUE. Always use bResult != BOOL.FALSE
+ /// or bResult == BOOL.FALSE .
+ /// </remarks>
+ internal enum BOOL : int
+ {
+ FALSE = 0,
+ TRUE = 1,
+ }
+}