Share via


IMetaDataAssemblyEmit::DefineFile Method

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

HRESULT DefineFile (
    [in]  LPCWSTR        szName, 
    [in]  const void     *pbHashValue, 
    [in]  ULONG          cbHashValue,
    [in]  DWORD          dwFileFlags,
    [out] mdFile         *pmdf
);

Parameters

  • szName
    [in] The name of the file to be consumed.
  • pbHashValue
    [in] A pointer to the hash data associated with the assembly.
  • cbHashValue
    [in] The size in bytes of pbHashValue.
  • dwFileFlags
    [in] A bitwise combination of FileFlags values that specify property settings.
  • pmdf
    [out] A pointer to the returned File token.

Remarks

One File metadata structure must be defined for each file that was part of this assembly at the time that this assembly was built, excluding the file that contains the metadata.

Requirements

Platform: 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

Reference

IMetaDataAssemblyEmit Interface