Share via


AddFile2 Method

Adds files to the assembly. Can also be used to create unbound modules.

HRESULT AddFile2(
    mdAssembly AssemblyID,
    LPCWSTR pszFilename,
    DWORD dwFlags,
    IMetaDataEmit2* pEmitter,
    mdFile* pFileToken
) PURE;

Parameters

  • AssemblyID
    ID for the assembly to which the file is added.

  • pszFilename
    Name of the file to be added.

  • dwFlags
    COM+ FileDef flags such as ffContainsNoMetaData and ffWriteable. dwFlags is passed to IMetaDataAssemblyEmit::DefineFile Method.

  • pEmitter
    Interface to IMetaDataEmit2 Interface interface.

  • pFileToken
    Receives ID for the file being added.

Return Value

Returns S_OK if the method succeeds.

Requirements

Requires alink.h.

See Also

Concepts

IALink2 Interface

IALink Interface

ALink API (Unmanaged API Reference)