Windows Dev Center

Expand Minimize

IMetaDataImport interface

Provides methods for importing and manipulating existing metadata from a portable executable (PE) file or other source, such as a type library or a stand-alone, run-time metadata binary.

Members

The IMetaDataImport interface inherits from the IUnknown interface. IMetaDataImport also has these types of members:

Methods

The IMetaDataImport interface has these methods.

MethodDescription
CloseEnum

Closes the enumerator that is identified by the specified handle.

CountEnum

Gets the number of elements in the enumeration that was retrieved by the specified enumerator.

EnumCustomAttributes

Enumerates custom attribute-definition tokens associated with the specified type or member.

EnumEvents

Enumerates event definition tokens for the specified TypeDef token.

EnumFields

Enumerates FieldDef tokens for the type referenced by the specified TypeDef token.

EnumFieldsWithName

Enumerates FieldDef tokens of the specified type with the specified name.

EnumInterfaceImpls

Enumerates MethodDef tokens representing interface implementations.

EnumMemberRefs

Enumerates MemberRef tokens representing members of the specified type.

EnumMembers

Enumerates MemberDef tokens representing members of the specified type.

EnumMembersWithName

Enumerates MemberDef tokens representing members of the specified type with the specified name.

EnumMethodImpls

Enumerates MethodBody and MethodDeclaration tokens representing methods of the specified type.

EnumMethods

Enumerates MethodDef tokens representing methods of the specified type.

EnumMethodSemantics

Enumerates the properties and the property-change events to which the specified method is related.

EnumMethodsWithName

Enumerates methods that have the specified name and that are defined by the type referenced by the specified TypeDef token.

EnumModuleRefs

Enumerates ModuleRef tokens that represent imported modules.

EnumParams

Enumerates ParamDef tokens representing the parameters of the method referenced by the specified MethodDef token.

EnumPermissionSets

Enumerates permissions for the objects in a specified metadata scope.

EnumProperties

Enumerates PropertyDef tokens representing the properties of the type referenced by the specified TypeDef token.

EnumSignatures

Enumerates Signature tokens representing stand-alone signatures in the current scope.

EnumTypeDefs

Enumerates TypeDef tokens representing all types within the current scope.

EnumTypeRefs

Enumerates TypeRef tokens defined in the current metadata scope.

EnumTypeSpecs

Enumerates TypeSpec tokens defined in the current metadata scope.

EnumUnresolvedMethods

Enumerates MemberDef tokens representing the unresolved methods in the current metadata scope.

EnumUserStrings

Enumerates String tokens representing hard-coded strings in the current metadata scope.

FindMemberRef

Gets a pointer to the MemberRef token for the member reference that is enclosed by the specified Type and that has the specified name and metadata signature.

FindTypeDefByName

Gets a pointer to the TypeDef metadata token for the Type with the specified name.

FindTypeRef

Gets a pointer to the TypeRef token for the Type reference that is in the specified scope and that has the specified name.

GetCustomAttributeByName

Gets the custom attribute, given its name and owner.

GetCustomAttributeProps

Gets the value of the custom attribute, given its metadata token.

GetFieldMarshal

Gets a pointer to the native, unmanaged type of the field represented by the specified field metadata token.

GetFieldProps

Gets metadata associated with the field referenced by the specified FieldDef token.

GetInterfaceImplProps

Gets a pointer to the metadata tokens for the Type that implements the specified method, and for the interface that declares that method.

GetMemberProps

Gets metadata information, including the name, binary signature, and relative virtual address, of the Type member referenced by the specified metadata token.

GetMemberRefProps

Gets metadata associated with the member referenced by the specified token.

GetMethodProps

Gets the metadata associated with the method referenced by the specified MethodDef token.

GetMethodSemantics

Gets flags indicating the relationship between the method referenced by the specified MethodDef token and the paired property and event referenced by the specified EventProp token.

GetModuleFromScope

Gets a metadata token for the module referenced in the current metadata scope.

GetModuleRefProps

Gets the name of the module referenced by the specified metadata token.

GetNameFromToken

Gets the UTF-8 name of the object referenced by the specified metadata token. This method is obsolete.

GetNativeCallConvFromSig

Gets the native calling convention for the method that is represented by the specified signature pointer.

GetNestedClassProps

Gets the TypeDef token for the parent Type of the specified nested type.

GetParamForMethodIndex

Gets the token that represents a specified parameter of the method represented by the specified MethodDef token.

GetParamProps

Gets metadata values for the parameter referenced by the specified ParamDef token.

GetPermissionSetProps

Gets the metadata associated with the System.Security.PermissionSet represented by the specified Permission token.

GetPinvokeMap

Gets a ModuleRef token to represent the target assembly of a PInvoke call.

GetRVA

Gets the relative virtual address (RVA) and the implementation flags of the method or field represented by the specified token.

GetScopeProps

Gets the name and optionally the version identifier of the assembly or module in the current metadata scope.

GetSigFromToken

Gets the binary metadata signature associated with the specified token.

GetTypeDefProps

Gets the metadata associated with the Type referenced by the specified TypeRef token.

GetTypeRefProps

Returns metadata information for the Type represented by the specified TypeDef token.

GetTypeSpecFromToken

Gets the binary metadata signature of the type specification represented by the specified token.

GetUserString

Gets the literal string represented by the specified metadata token.

IsGlobal

Gets a value indicating whether the field, method, or type represented by the specified metadata token has global scope.

IsValidToken

Gets a value indicating whether the specified token holds a valid reference to a code object.

ResetEnum

Resets the specified enumerator to the specified position.

ResolveTypeRef

Resolves a Type reference represented by the specified TypeRef token.

 

Requirements

IDL

Rometadataapi.idl

 

 

Community Additions

ADD
Show:
© 2015 Microsoft