Share via


IMetaDataAssemblyEmit Interface

Provides methods that support the self-description model used by the common language runtime to resolve and consume resources.

interface IMetaDataAssemblyEmit {
        
    HRESULT DefineAssembly (
        [in] const void     *pbPublicKey,
        [in] ULONG          cbPublicKey, 
        [in] ULONG          ulHashAlgId, 
        [in] LPCWSTR        szName, 
        [in] const ASSEMBLYMETADATA *pMetaData,  
        [in] DWORD          dwAssemblyFlags, 
        [out] mdAssembly    *pma
    ); 
        
    HRESULT DefineAssemblyRef (
        [in] const void     *pbPublicKeyOrToken,
        [in] ULONG          cbPublicKeyOrToken, 
        [in] LPCWSTR        szName, 
        [in] const ASSEMBLYMETADATA *pMetaData,
        [in] const void     *pbHashValue, 
        [in] ULONG          cbHashValue,
        [in] DWORD          dwAssemblyRefFlags,
        [out] mdAssemblyRef *pmdar
    );
        
    HRESULT DefineExportedType (
        [in] LPCWSTR        szName,
        [in] mdToken        tkImplementation, 
        [in] mdTypeDef      tkTypeDef,
        [in] DWORD          dwExportedTypeFlags,
        [out] mdExportedType   *pmdct
    );
        
    HRESULT DefineFile (
        [in] LPCWSTR        szName, 
        [in] const void     *pbHashValue, 
        [in] ULONG          cbHashValue,
        [in] DWORD          dwFileFlags,
        [out] mdFile        *pmdf
    );
        
    HRESULT DefineManifestResource (
        [in] LPCWSTR        szName, 
        [in] mdToken        tkImplementation, 
        [in] DWORD          dwOffset, 
        [in] DWORD          dwResourceFlags,
        [out] mdManifestResource  *pmdmr
    );
        
    HRESULT SetAssemblyProps (
        [in] mdAssembly     pma,
        [in] const void     *pbPublicKey,
        [in] ULONG          cbPublicKey,
        [in] ULONG          ulHashAlgId,
        [in] LPCWSTR        szName,
        [in] const ASSEMBLYMETADATA *pMetaData,
        [in] DWORD          dwAssemblyFlags
    );
        
    HRESULT SetAssemblyRefProps (
        [in] mdAssemblyRef  ar,
        [in] const void     *pbPublicKeyOrToken,
        [in] ULONG          cbPublicKeyOrToken,
        [in] LPCWSTR        szName, 
        [in] const ASSEMBLYMETADATA *pMetaData, 
        [in] const void     *pbHashValue,
        [in] ULONG          cbHashValue,
        [in] DWORD          dwAssemblyRefFlags
    );
        
    HRESULT SetExportedTypeProps (
        [in] mdExportedType ct, 
        [in] mdToken        tkImplementation,
        [in] mdTypeDef      tkTypeDef,
        [in] DWORD          dwExportedTypeFlags
    );
        
    HRESULT SetFileProps (
        [in] mdFile         file,
        [in] const void     *pbHashValue, 
        [in] ULONG          cbHashValue,
        [in] DWORD          dwFileFlags
    );
        
    HRESULT SetManifestResourceProps (
        [in] mdManifestResource  mr,
        [in] mdToken        tkImplementation, 
        [in] DWORD          dwOffset,
        [in] DWORD          dwResourceFlags
    );
        
};

Methods

Method

Description

IMetaDataAssemblyEmit::DefineAssembly Method

Creates an assembly data structure containing metadata for the specified assembly, and returns the associated metadata token.

IMetaDataAssemblyEmit::DefineAssemblyRef Method

Creates an AssemblyRef structure containing metadata for the assembly that this assembly references, and returns the associated metadata token.

IMetaDataAssemblyEmit::DefineExportedType Method

Creates an ExportedType structure containing metadata for the specified exported type, and returns the associated metadata token.

IMetaDataAssemblyEmit::DefineFile Method

Creates a File metadata structure containing metadata for assembly referenced by this assembly, and returns the associated metadata token.

IMetaDataAssemblyEmit::DefineManifestResource Method

Creates a ManifestResource structure containing metadata for the specified manifest resource, and returns the associated metadata token.

IMetaDataAssemblyEmit::SetAssemblyProps Method

Modifies the specified Assembly metadata structure.

IMetaDataAssemblyEmit::SetAssemblyRefProps Method

Modifies the specified AssemblyRef metadata structure.

IMetaDataAssemblyEmit::SetExportedTypeProps Method

Modifies the specified ExportedType metadata structure.

IMetaDataAssemblyEmit::SetFileProps Method

Modifies the specified File metadata structure.

IMetaDataAssemblyEmit::SetManifestResourceProps Method

Modifies the specified ManifestResource metadata structure.

Remarks

For more information on metadata tokens, see Metadata Tokens Overview.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Used as a resource in MsCorEE.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Concepts

Metadata Interfaces

ASSEMBLYMETADATA Structure

IMetaDataAssemblyImport Interface