IMetaDataEmit Interface

 

Provides methods to create, modify, and save metadata about the assembly in the currently defined scope. The metadata can be stored in memory or saved to disk.

MethodDescription
ApplyEditAndContinue MethodUpdates the current assembly scope with the changes made in the specified pImport.
DefineCustomAttribute MethodCreates a definition for a custom attribute with the specified metadata signature, to be attached to the specified object, and gets a token to that custom attribute definition.
DefineEvent MethodCreates a definition for an event with the specified metadata signature, and gets a token to that event definition.
DefineField MethodCreates a definition for a field with the specified metadata signature, and gets a token to that field definition.
DefineImportMember MethodCreates a definition for a member of a type that is defined in a module outside the current scope, and gets a token for that reference definition.
DefineImportType MethodCreates a definition for a reference to a type that is defined in a module outside the current scope, and gets a token to that reference definition.
DefineMemberRef MethodCreates a definition for a reference to a member of a module outside the current scope, and gets a token to that reference definition.
DefineMethod MethodCreates a definition for a method with the specified signature, and returns a token to that method definition.
DefineMethodImpl MethodCreates a definition for implementation of a method inherited from an interface, and returns a token to that method-implementation definition.
DefineModuleRef MethodCreates the metadata signature for a module with the specified name.
DefineNestedType MethodCreates the metadata signature of a type definition and returns an mdTypeDef token for that type, additionally specifying that the defined type is a member of the type referenced by tdEncloser.
DefineParam MethodCreates a parameter definition with the specified signature for the method referenced by the specified token, and gets a token for that parameter definition.
DefinePermissionSet MethodCreates a definition for a permission set with the specified metadata signature, and gets a token to that permission set definition.
DefinePinvokeMap MethodSets features of the PInvoke signature of the method referenced by the specified token.
DefineProperty MethodCreates a property definition for the specified type, with the specified get and set method accessors, and gets a token to that property definition.
DefineSecurityAttributeSet MethodCreates a set of security permissions to attach to the object referenced by the specified token.
DefineTypeDef MethodCreates a type definition for a common language runtime type, and gets a metadata token to that type definition.
DefineTypeRefByName MethodGets a metadata token for a type that is defined in another module outside the current scope.
DefineUserString MethodGets a metadata token for the specified literal string.
DeleteClassLayout MethodDestroys the class layout metadata signature for the type referenced by the specified token.
DeleteFieldMarshal MethodDestroys the PInvoke marshaling metadata signature for the object referenced by the specified token.
DeletePinvokeMap MethodDestroys the PInvoke mapping metadata for the object referenced by the specified token.
DeleteToken MethodDeletes the specified token from the current metadata scope.
GetSaveSize MethodGets the estimated binary size of the assembly in the current scope.
GetTokenFromSig MethodGets a token for the specified metadata signature.
GetTokenFromTypeSpec MethodGets a metadata token for the type with the specified metadata signature.
Merge MethodAdds the specified imported scope to the list of scopes to be merged.
MergeEnd MethodMerges into the current scope all the metadata scopes specified by one or more prior calls to IMetaDataEmit::Merge.
Save MethodSaves all metadata in the current scope to the file at the specified address.
SaveToMemory MethodSaves all metadata in the current scope to the specified area of memory.
SaveToStream MethodSaves all metadata in the current scope to the specified IStream.
SetClassLayout MethodSets or updates the class layout signature of a type defined by a prior call to IMetaDataEmit::DefineTypeDef.
SetCustomAttributeValue MethodSets or updates the value of a custom attribute defined by a prior call to IMetaDataEmit::DefineCustomAttribute.
SetEventProps MethodSets or updates the specified feature of an event defined by a prior call to IMetaDataEmit::DefineEvent.
SetFieldMarshal MethodSets the PInvoke marshaling information for the field, method return, or method parameter referenced by the specified token.
SetFieldProps MethodSets or updates the default value for the field referenced by the specified field token.
SetFieldRVA MethodSets a global variable value for the relative virtual address of the field referenced by the specified token.
SetHandler MethodSets the method referenced by the specified IUnknown pointer as a notification callback for token remaps.
SetMethodImplFlags MethodSets or updates the metadata signature of the inherited method implementation referenced by the specified token.
SetMethodProps MethodSets or updates the feature, stored at the specified relative virtual address, of a method defined by a prior call to IMetaDataEmit::DefineMethod.
SetModuleProps MethodUpdates references to a module defined by a prior call to IMetaDataEmit::DefineModuleRef.
SetParamProps MethodSets or changes features of a method parameter that was defined by a prior call to IMetaDataEmit::DefineParam.
SetParent MethodEstablishes that the specified member, as defined by a prior call to IMetaDataEmit::DefineMemberRef, is a member of the specified type, as defined by a prior call to IMetaDataEmit::DefineTypeDef.
SetPermissionSetProps MethodSets or updates features of the metadata signature of a permission set defined by a prior call to IMetaDataEmit::DefinePermissionSet.
SetPinvokeMap MethodSets or changes features of a method's PInvoke signature, as defined by a prior call to IMetaDataEmit::DefinePinvokeMap.
SetPropertyProps MethodSets the features stored in metadata for a property defined by a prior call to IMetaDataEmit::DefineProperty.
SetRVA MethodSets the relative virtual address of the specified method.
SetTypeDefProps MethodSets features of a type defined by a prior call to IMetaDataEmit::DefineTypeDef.
TranslateSigWithScope MethodImports an assembly into the current scope and gets a new metadata signature for the merged scope.

Platforms: See System Requirements.

Header: Cor.h

Library: Used as a resource in MsCorEE.dll

.NET Framework Versions: Available since 1.0

Metadata Interfaces
IMetaDataEmit2 Interface

Show: