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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// 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.
/*=============================================================================
**
**
**
** Purpose: ITypeLib interface definition.
**
**
=============================================================================*/
using System;
namespace System.Runtime.InteropServices.ComTypes
{
public enum SYSKIND
{
SYS_WIN16 = 0,
SYS_WIN32 = SYS_WIN16 + 1,
SYS_MAC = SYS_WIN32 + 1,
SYS_WIN64 = SYS_MAC + 1
}
[Flags()]
public enum LIBFLAGS : short
{
LIBFLAG_FRESTRICTED = 0x1,
LIBFLAG_FCONTROL = 0x2,
LIBFLAG_FHIDDEN = 0x4,
LIBFLAG_FHASDISKIMAGE = 0x8
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TYPELIBATTR
{
public Guid guid;
public int lcid;
public SYSKIND syskind;
public Int16 wMajorVerNum;
public Int16 wMinorVerNum;
public LIBFLAGS wLibFlags;
}
[Guid("00020402-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
public interface ITypeLib
{
[PreserveSig]
int GetTypeInfoCount();
void GetTypeInfo(int index, out ITypeInfo ppTI);
void GetTypeInfoType(int index, out TYPEKIND pTKind);
void GetTypeInfoOfGuid(ref Guid guid, out ITypeInfo ppTInfo);
void GetLibAttr(out IntPtr ppTLibAttr);
void GetTypeComp(out ITypeComp ppTComp);
void GetDocumentation(int index, out String strName, out String strDocString, out int dwHelpContext, out String strHelpFile);
[return: MarshalAs(UnmanagedType.Bool)]
bool IsName([MarshalAs(UnmanagedType.LPWStr)] String szNameBuf, int lHashVal);
void FindName([MarshalAs(UnmanagedType.LPWStr)] String szNameBuf, int lHashVal, [MarshalAs(UnmanagedType.LPArray), Out] ITypeInfo[] ppTInfo, [MarshalAs(UnmanagedType.LPArray), Out] int[] rgMemId, ref Int16 pcFound);
[PreserveSig]
void ReleaseTLibAttr(IntPtr pTLibAttr);
}
}
|