ImportFile2 Method
Imports assemblies and unbound modules. This method is like ImportFile Method, but works even if the file being imported does not exist on disk.
HRESULT ImportFile2(
LPCWSTR pszFilename,
LPCWSTR pszTargetName,
IMetaDataAssemblyImport* pAssemblyScopeIn,
BOOL fSmartImport,
mdToken* pImportToken,
IMetaDataAssemblyImport** ppAssemblyScope,
DWORD* pdwCountOfScopes
) PURE;
Parameters
- pszFilename
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.
- pAssemblyScopeIn
Optional scope IMetaDataAssemblyImport Interface interface.
- fSmartImport
If TRUE, ImportTypes is used, otherwise importing must be performed manually.
- pImportToken
Receives the ID for the file or assembly.
- ppAssemblyScope
Receives the IMetaDataAssemblyImport Interface interface. NULL if the file is not an assembly.
- pdwCountOfScopes
Receives the found of files and/or scopes imported.
Return Value
Returns S_OK if the method succeeds.
Requirements
Requires alink.h.
See Also
Concepts
ALink API (Unmanaged API Reference)