Partilhar via


IMetaDataImport::EnumTypeRefs Method

Enumerates TypeRef tokens defined in the current metadata scope.

HRESULT EnumTypeRefs (
    HCORENUM    *phEnum, 
    mdTypeRef   rTypeRefs[],
    ULONG       cMax, 
    ULONG       *pcTypeRefs
);

Parameters

Parameter Description

phEnum

[in, out] A pointer to the enumerator. This must be NULL for the first call of this method.

rTypeRefs

[out] The array used to store the TypeRef tokens.

cMax

[in] The maximum size of the rTypeRefs array.

pcTypeRefs

[out] A pointer to the number of TypeRef tokens returned in rTypeRefs.

Return Value

HRESULT Description

S_OK

EnumTypeRefs returned successfully.

S_FALSE

There are no tokens to enumerate. In that case, pcTypeRefs is zero.

Remarks

A TypeRef token represents a reference to a type.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Included as a resource in Mscoree.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface
IMetaDataImport2 Interface