summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeComp.cs
blob: 7e6379361518777bf2a61bffb91280875e6fc697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.

namespace System.Runtime.InteropServices.ComTypes
{
    public enum DESCKIND
    {
        DESCKIND_NONE = 0,
        DESCKIND_FUNCDESC = DESCKIND_NONE + 1,
        DESCKIND_VARDESC = DESCKIND_FUNCDESC + 1,
        DESCKIND_TYPECOMP = DESCKIND_VARDESC + 1,
        DESCKIND_IMPLICITAPPOBJ = DESCKIND_TYPECOMP + 1,
        DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ + 1
    }

    [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
    public struct BINDPTR
    {
        [FieldOffset(0)]
        public IntPtr lpfuncdesc;
        [FieldOffset(0)]
        public IntPtr lpvardesc;
        [FieldOffset(0)]
        public IntPtr lptcomp;
    }

    [Guid("00020403-0000-0000-C000-000000000046")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    [ComImport]
    public interface ITypeComp
    {
        void Bind([MarshalAs(UnmanagedType.LPWStr)] string szName, int lHashVal, short wFlags, out ITypeInfo ppTInfo, out DESCKIND pDescKind, out BINDPTR pBindPtr);
        void BindType([MarshalAs(UnmanagedType.LPWStr)] string szName, int lHashVal, out ITypeInfo ppTInfo, out ITypeComp ppTComp);
    }
}