PageRenderTime 35ms CodeModel.GetById 15ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 0ms

/Debugger/Debugger.Core/Interop/MetaData.cs

http://github.com/icsharpcode/ILSpy
C# | 278 lines | 240 code | 21 blank | 17 comment | 0 complexity | 83a3f2c0f28c89c6948f7aed7dd95761 MD5 | raw file
  1// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
  2// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
  3
  4#pragma warning disable 108, 1591 
  5
  6using System;
  7using System.Runtime.CompilerServices;
  8using System.Runtime.InteropServices;
  9
 10namespace Debugger.Interop.MetaData
 11{
 12    [StructLayout(LayoutKind.Sequential, Pack=4)]
 13    public struct COR_FIELD_OFFSET
 14    {
 15        public uint ridOfField;
 16        public uint ulOffset;
 17    }
 18	[System.Flags()]
 19	public enum ClassFieldAttribute: uint
 20	{
 21		// member access mask - Use this mask to retrieve accessibility information.
 22		fdFieldAccessMask           =   0x0007,
 23		fdPrivateScope              =   0x0000,     // Member not referenceable.
 24		fdPrivate                   =   0x0001,     // Accessible only by the parent type.  
 25		fdFamANDAssem               =   0x0002,     // Accessible by sub-types only in this Assembly.
 26		fdAssembly                  =   0x0003,     // Accessibly by anyone in the Assembly.
 27		fdFamily                    =   0x0004,     // Accessible only by type and sub-types.    
 28		fdFamORAssem                =   0x0005,     // Accessibly by sub-types anywhere, plus anyone in assembly.
 29		fdPublic                    =   0x0006,     // Accessibly by anyone who has visibility to this scope.    
 30		// end member access mask
 31
 32		// field contract attributes.
 33		fdStatic                    =   0x0010,     // Defined on type, else per instance.
 34		fdInitOnly                  =   0x0020,     // Field may only be initialized, not written to after init.
 35		fdLiteral                   =   0x0040,     // Value is compile time constant.
 36		fdNotSerialized             =   0x0080,     // Field does not have to be serialized when type is remoted.
 37
 38		fdSpecialName               =   0x0200,     // field is special.  Name describes how.
 39
 40		// interop attributes
 41		fdPinvokeImpl               =   0x2000,     // Implementation is forwarded through pinvoke.
 42
 43		// Reserved flags for runtime use only.
 44		fdReservedMask              =   0x9500,
 45		fdRTSpecialName             =   0x0400,     // Runtime(metadata internal APIs) should check name encoding.
 46		fdHasFieldMarshal           =   0x1000,     // Field has marshalling information.
 47		fdHasDefault                =   0x8000,     // Field has default.
 48		fdHasFieldRVA               =   0x0100,     // Field has RVA.
 49	}
 50	public enum CorCallingConvention: uint
 51	{
 52	    IMAGE_CEE_CS_CALLCONV_DEFAULT   = 0x0,  
 53	
 54	    IMAGE_CEE_CS_CALLCONV_VARARG    = 0x5,  
 55	    IMAGE_CEE_CS_CALLCONV_FIELD     = 0x6,  
 56	    IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x7,
 57	    IMAGE_CEE_CS_CALLCONV_PROPERTY  = 0x8,
 58	    IMAGE_CEE_CS_CALLCONV_UNMGD     = 0x9,
 59	    IMAGE_CEE_CS_CALLCONV_MAX       = 0x10,  // first invalid calling convention    
 60	
 61	
 62	        // The high bits of the calling convention convey additional info   
 63	    IMAGE_CEE_CS_CALLCONV_MASK      = 0x0f,  // Calling convention is bottom 4 bits 
 64	    IMAGE_CEE_CS_CALLCONV_HASTHIS   = 0x20,  // Top bit indicates a 'this' parameter    
 65	    IMAGE_CEE_CS_CALLCONV_EXPLICITTHIS = 0x40,  // This parameter is explicitly in the signature
 66	}
 67	public enum CorMethodAttr: uint
 68	{
 69	    // member access mask - Use this mask to retrieve accessibility information.
 70	    mdMemberAccessMask          =   0x0007,
 71	    mdPrivateScope              =   0x0000,     // Member not referenceable.
 72	    mdPrivate                   =   0x0001,     // Accessible only by the parent type.  
 73	    mdFamANDAssem               =   0x0002,     // Accessible by sub-types only in this Assembly.
 74	    mdAssem                     =   0x0003,     // Accessibly by anyone in the Assembly.
 75	    mdFamily                    =   0x0004,     // Accessible only by type and sub-types.    
 76	    mdFamORAssem                =   0x0005,     // Accessibly by sub-types anywhere, plus anyone in assembly.
 77	    mdPublic                    =   0x0006,     // Accessibly by anyone who has visibility to this scope.    
 78	    // end member access mask
 79	
 80	    // method contract attributes.
 81	    mdStatic                    =   0x0010,     // Defined on type, else per instance.
 82	    mdFinal                     =   0x0020,     // Method may not be overridden.
 83	    mdVirtual                   =   0x0040,     // Method virtual.
 84	    mdHideBySig                 =   0x0080,     // Method hides by name+sig, else just by name.
 85	
 86	    // vtable layout mask - Use this mask to retrieve vtable attributes.
 87	    mdVtableLayoutMask          =   0x0100,
 88	    mdReuseSlot                 =   0x0000,     // The default.
 89	    mdNewSlot                   =   0x0100,     // Method always gets a new slot in the vtable.
 90	    // end vtable layout mask
 91	
 92	    // method implementation attributes.
 93	    mdCheckAccessOnOverride     =   0x0200,     // Overridability is the same as the visibility.
 94	    mdAbstract                  =   0x0400,     // Method does not provide an implementation.
 95	    mdSpecialName               =   0x0800,     // Method is special.  Name describes how.
 96	    
 97	    // interop attributes
 98	    mdPinvokeImpl               =   0x2000,     // Implementation is forwarded through pinvoke.
 99	    mdUnmanagedExport           =   0x0008,     // Managed method exported via thunk to unmanaged code.
100	
101	    // Reserved flags for runtime use only.
102	    mdReservedMask              =   0xd000,
103	    mdRTSpecialName             =   0x1000,     // Runtime should check name encoding.
104	    mdHasSecurity               =   0x4000,     // Method has security associate with it.
105	    mdRequireSecObject          =   0x8000,     // Method calls another method containing security code.
106	
107	}
108	public enum CorTokenType: uint
109	{
110		Module               = 0x00000000,       //          
111		TypeRef              = 0x01000000,       //          
112		TypeDef              = 0x02000000,       //          
113		FieldDef             = 0x04000000,       //           
114		MethodDef            = 0x06000000,       //       
115		ParamDef             = 0x08000000,       //           
116		InterfaceImpl        = 0x09000000,       //  
117		MemberRef            = 0x0a000000,       //       
118		CustomAttribute      = 0x0c000000,       //      
119		Permission           = 0x0e000000,       //       
120		Signature            = 0x11000000,       //       
121		Event                = 0x14000000,       //           
122		Property             = 0x17000000,       //           
123		ModuleRef            = 0x1a000000,       //       
124		TypeSpec             = 0x1b000000,       //           
125		Assembly             = 0x20000000,       //
126		AssemblyRef          = 0x23000000,       //
127		File                 = 0x26000000,       //
128		ExportedType         = 0x27000000,       //
129		ManifestResource     = 0x28000000,       //
130		
131		String               = 0x70000000,       //          
132		Name                 = 0x71000000,       //
133		BaseType             = 0x72000000,       // Leave this on the high end value. This does not correspond to metadata table
134	}
135
136    [ComImport, InterfaceType((short) 1), Guid("7DAC8207-D3AE-4C75-9B67-92801A497D44"), ComConversionLoss]
137    public interface IMetaDataImport
138    {
139        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
140        void CloseEnum(IntPtr hEnum);
141        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
142        void CountEnum(IntPtr hEnum, out uint pulCount);
143        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
144        void ResetEnum(IntPtr hEnum, uint ulPos);
145        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
146        void EnumTypeDefs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rTypeDefs, uint cMax, out uint pcTypeDefs);
147        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
148        void EnumInterfaceImpls(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rImpls, uint cMax, out uint pcImpls);
149        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
150        void EnumTypeRefs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rTypeRefs, uint cMax, out uint pcTypeRefs);
151        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
152        void FindTypeDefByName([In, MarshalAs(UnmanagedType.LPWStr)] string szTypeDef, uint tkEnclosingClass, out uint ptd);
153        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
154        void GetScopeProps(IntPtr szName, uint cchName, out uint pchName, out Guid pmvid);
155        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
156        void GetModuleFromScope(out uint pmd);
157        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
158        void GetTypeDefProps(uint td, IntPtr szTypeDef, uint cchTypeDef, out uint pchTypeDef, out uint pdwTypeDefFlags, out uint ptkExtends);
159        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
160        void GetInterfaceImplProps(uint iiImpl, out uint pClass, out uint ptkIface);
161        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
162        void GetTypeRefProps(uint tr, out uint ptkResolutionScope, IntPtr szName, uint cchName, out uint pchName);
163        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
164        void ResolveTypeRef(uint tr, [In] ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppIScope, out uint ptd);
165        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
166        void EnumMembers(ref IntPtr phEnum, uint cl, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMembers, uint cMax, out uint pcTokens);
167        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
168        void EnumMembersWithName(ref IntPtr phEnum, uint cl, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMembers, uint cMax, out uint pcTokens);
169        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
170        void EnumMethods(ref IntPtr phEnum, uint cl, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethods, uint cMax, out uint pcTokens);
171        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
172        void EnumMethodsWithName(ref IntPtr phEnum, uint cl, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethods, uint cMax, out uint pcTokens);
173        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
174        void EnumFields(ref IntPtr phEnum, uint cl, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rFields, uint cMax, out uint pcTokens);
175        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
176        void EnumFieldsWithName(ref IntPtr phEnum, uint cl, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rFields, uint cMax, out uint pcTokens);
177        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
178        void EnumParams(ref IntPtr phEnum, uint mb, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rParams, uint cMax, out uint pcTokens);
179        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
180        void EnumMemberRefs(ref IntPtr phEnum, uint tkParent, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMemberRefs, uint cMax, out uint pcTokens);
181        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
182        void EnumMethodImpls(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethodBody, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethodDecl, uint cMax, out uint pcTokens);
183        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
184        void EnumPermissionSets(ref IntPtr phEnum, uint tk, uint dwActions, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rPermission, uint cMax, out uint pcTokens);
185        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
186        void FindMember(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmb);
187        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
188        void FindMethod(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmb);
189        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
190        void FindField(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmb);
191        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
192        void FindMemberRef(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmr);
193        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
194        void GetMethodProps(uint mb, out uint pClass, IntPtr szMethod, uint cchMethod, out uint pchMethod, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pulCodeRVA, out uint pdwImplFlags);
195        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
196        void GetMemberRefProps(uint mr, out uint ptk, IntPtr szMember, uint cchMember, out uint pchMember, out IntPtr ppvSigBlob, out uint pbSig);
197        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
198        void EnumProperties(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rProperties, uint cMax, out uint pcProperties);
199        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
200        void EnumEvents(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rEvents, uint cMax, out uint pcEvents);
201        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
202        void GetEventProps(uint ev, out uint pClass, IntPtr  szEvent, uint cchEvent, out uint pchEvent, out uint pdwEventFlags, out uint ptkEventType, out uint pmdAddOn, out uint pmdRemoveOn, out uint pmdFire, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rmdOtherMethod, uint cMax, out uint pcOtherMethod);
203        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
204        void EnumMethodSemantics(ref IntPtr phEnum, uint mb, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rEventProp, uint cMax, out uint pcEventProp);
205        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
206        void GetMethodSemantics(uint mb, uint tkEventProp, out uint pdwSemanticsFlags);
207        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
208        void GetClassLayout(uint td, out uint pdwPackSize, [Out] COR_FIELD_OFFSET[] rFieldOffset, uint cMax, out uint pcFieldOffset, out uint pulClassSize);
209        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
210        void GetFieldMarshal(uint tk, out IntPtr ppvNativeType, out uint pcbNativeType);
211        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
212        void GetRVA(uint tk, out uint pulCodeRVA, out uint pdwImplFlags);
213        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
214        void GetPermissionSetProps(uint pm, out uint pdwAction, out IntPtr ppvPermission, out uint pcbPermission);
215        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
216        void GetSigFromToken(uint mdSig, out IntPtr ppvSig, out uint pcbSig);
217        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
218        void GetModuleRefProps(uint mur, IntPtr szName, uint cchName, out uint pchName);
219        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
220        void EnumModuleRefs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rModuleRefs, uint cMax, out uint pcModuleRefs);
221        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
222        void GetTypeSpecFromToken(uint typespec, out IntPtr ppvSig, out uint pcbSig);
223        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
224        void GetNameFromToken(uint tk, IntPtr pszUtf8NamePtr);
225        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
226        void EnumUnresolvedMethods(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethods, uint cMax, out uint pcTokens);
227        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
228        void GetUserString(uint stk, IntPtr szString, uint cchString, out uint pchString);
229        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
230        void GetPinvokeMap(uint tk, out uint pdwMappingFlags, IntPtr szImportName, uint cchImportName, out uint pchImportName, out uint pmrImportDLL);
231        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
232        void EnumSignatures(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rSignatures, uint cMax, out uint pcSignatures);
233        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
234        void EnumTypeSpecs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rTypeSpecs, uint cMax, out uint pcTypeSpecs);
235        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
236        void EnumUserStrings(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rStrings, uint cMax, out uint pcStrings);
237        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
238        void GetParamForMethodIndex(uint md, uint ulParamSeq, out uint ppd);
239        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
240        void EnumCustomAttributes(ref IntPtr phEnum, uint tk, uint tkType, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rCustomAttributes, uint cMax, out uint pcCustomAttributes);
241        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
242        void GetCustomAttributeProps(uint cv, out uint ptkObj, out uint ptkType, out IntPtr ppBlob, out uint pcbSize);
243        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
244        void FindTypeRef(uint tkResolutionScope, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, out uint ptr);
245        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
246        void GetMemberProps(uint mb, out uint pClass, IntPtr szMember, uint cchMember, out uint pchMember, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pulCodeRVA, out uint pdwImplFlags, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue);
247        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
248        void GetFieldProps(uint mb, out uint pClass, [In] IntPtr szField, uint cchField, out uint pchField, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue);
249        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
250        void GetPropertyProps(uint prop, out uint pClass, IntPtr szProperty, uint cchProperty, out uint pchProperty, out uint pdwPropFlags, out IntPtr ppvSig, out uint pbSig, out uint pdwCPlusTypeFlag, out IntPtr ppDefaultValue, out uint pcchDefaultValue, out uint pmdSetter, out uint pmdGetter, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rmdOtherMethod, uint cMax, out uint pcOtherMethod);
251        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
252        void GetParamProps(uint tk, out uint pmd, out uint pulSequence, IntPtr szName, uint cchName, out uint pchName, out uint pdwAttr, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue);
253        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
254        void GetCustomAttributeByName(uint tkObj, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, out IntPtr ppData, out uint pcbData);
255        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
256        int IsValidToken(uint tk);
257        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
258        void GetNestedClassProps(uint tdNestedClass, out uint ptdEnclosingClass);
259        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
260        void GetNativeCallConvFromSig([In] IntPtr pvSig, uint cbSig, out uint pCallConv);
261        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
262        void IsGlobal(uint pd, out int pbGlobal);
263        
264        // IMetaDataImport2
265        
266        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
267        void EnumGenericParams(ref IntPtr hEnum, uint tk, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rGenericParams, uint cMax, out uint pcGenericParams);    
268        void GetGenericParamProps();
269        void GetMethodSpecProps();
270        void EnumGenericParamConstraints();
271        void GetGenericParamConstraintProps();
272        void GetPEKind();
273        void GetVersionString();
274        void EnumMethodSpecs();
275    }
276}
277
278#pragma warning restore 108, 1591