ImportTypes 方法ImportTypes Method

开始从通过ImportFile 方法导入的每个范围导入类型。Initiates the importing of types from each scope imported via ImportFile Method.

语法Syntax

HRESULT ImportTypes(  
    mdAssembly AssemblyID,  
    mdToken FileToken,  
    DWORD dwScope,  
    HALINKENUM* phEnum,  
    IMetaDataImport** ppImportScope,  
    DWORD* pdwCountOfTypes  
) PURE;  

参数Parameters

AssemblyID
要导入到的程序集的 ID。ID of the assembly to import to.

FileToken
要从中导入的文件的 ID。ID of the file to import from.

dwScope
要导入的从零开始的范围。Zero-based scope to import.

phEnum
接收此范围内的类型的枚举器句柄。Receives enumerator handle for the types in this scope.

ppImportScope
可以选择接收IMetaDataImport 接口接口。Optionally receives IMetaDataImport Interface interface.

pdwCountOfTypes
可以选择接收指定范围内的类型的计数。Optionally receives count of types in the indicated scope.

返回值Return Value

如果方法成功,则返回 S_OK。Returns S_OK if the method succeeds.

要求Requirements

需要 alinkRequires alink.h

另请参阅See also