Condividi tramite


ImportFileEx Method

Imports indicated assembly or unbound module.

HRESULT ImportFileEx(
    LPCWSTR pszFilename,
    LPCWSTR pszTargetName,
    BOOL fSmartImport,
    DWORD dwOpenFlags,
    mdToken* pImportToken,
    IMetaDataAssemblyImport** ppAssemblyScope,
    DWORD* pdwCountOfScopes
) PURE;

Parameters

  • pszFilename
    Fully qualified name of file from which to import.

  • pszTargetName
    Optional name of target file.

  • fSmartImport
    If TRUE, ImportTypes is used, otherwise importing must be performed manually.

  • dwOpenFlags
    Flags to be passed along to IMetaDataDispenser::OpenScope Method.

  • pImportToken
    Receives ID of the file being imported.

  • ppAssemblyScope
    Receives assembly import scope IMetaDataAssemblyImport Interface interface. Is set to NULL if file is not an assembly.

  • pdwCountOfScopes
    Receives count of imported files and/or scopes.

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)