IMetaDataImport::ResolveTypeRef method (rometadataapi.h)
Resolves a Type reference represented by the specified TypeRef token.
Syntax
HRESULT ResolveTypeRef(
[in] mdTypeRef tkTypeRef,
[in] REFIID riid,
[out] IUnknown **ppIScope,
[out, retval] mdTypeDef *ptkTypeDef
);
Parameters
[in] tkTypeRef
The TypeRef metadata token to return the referenced type information for.
[in] riid
The IID of the interface to return in ppIScope. Typically, this would be IID_IMetaDataImport.
[out] ppIScope
An interface to the module scope in which the referenced type is defined.
[out, retval] ptkTypeDef
A pointer to a TypeDef token that represents the referenced type.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If the type reference to be resolved has a resolution scope of AssemblyRef, the ResolveTypeRef method searches for a match only in the metadata scopes that have already been opened with calls to either the IMetaDataDispenser::OpenScope method or the IMetaDataDispenser::OpenScopeOnMemory method. This is because ResolveTypeRef cannot determine from only the AssemblyRef scope where on disk or in the global assembly cache the assembly is stored.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | rometadataapi.h |