diff options
Diffstat (limited to 'src/Common/src/Interop/Windows/ole32/Interop.CoGetApartmentType.cs')
-rw-r--r-- | src/Common/src/Interop/Windows/ole32/Interop.CoGetApartmentType.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Common/src/Interop/Windows/ole32/Interop.CoGetApartmentType.cs b/src/Common/src/Interop/Windows/ole32/Interop.CoGetApartmentType.cs new file mode 100644 index 000000000..a7aca2ab7 --- /dev/null +++ b/src/Common/src/Interop/Windows/ole32/Interop.CoGetApartmentType.cs @@ -0,0 +1,36 @@ +// 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. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal static partial class Interop +{ + internal enum APTTYPE : uint + { + APTTYPE_STA = 0x0u, + APTTYPE_MTA = 0x1u, + APTTYPE_NA = 0x2u, + APTTYPE_MAINSTA = 0x3u, + APTTYPE_CURRENT = 0xFFFFFFFFu, + } + + internal enum APTTYPEQUALIFIER : uint + { + APTTYPEQUALIFIER_NONE = 0x0u, + APTTYPEQUALIFIER_IMPLICIT_MTA = 0x1u, + APTTYPEQUALIFIER_NA_ON_MTA = 0x2u, + APTTYPEQUALIFIER_NA_ON_STA = 0x3u, + APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA = 0x4u, + APTTYPEQUALIFIER_NA_ON_MAINSTA = 0x5u, + APTTYPEQUALIFIER_APPLICATION_STA = 0x6u, + } + + internal static partial class Ole32 + { + [DllImport(Interop.Libraries.Ole32, ExactSpelling = true)] + internal extern static int CoGetApartmentType(out APTTYPE pAptType, out APTTYPEQUALIFIER pAptQualifier); + } +} |