Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ImportFile Method

Imports assemblies and unbound modules.

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

pszFilename

Fully qualified name of file to be imported.

pszTargetName

Optional output file name that can be used to rename the file as it is linked into the assembly.

fSmartImport

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

pImportToken

Pointer to token where a unique file ID will be stored. The file can be an assembly or a file.

ppAssemblyScope

Receives pointer to IMetaDataAssemblyImport Interface. Can be NULL if the file is not an assembly.

pdwCountOfScopes

Pointer to the count of files and/or scopes that have been imported.

Returns S_OK if the method succeeds.

Requires alink.h

Show:
© 2015 Microsoft