Partager via


IMetaDataImport::EnumTypeDefs Method

Enumerates TypeDef tokens representing all types within the current scope.

HRESULT EnumTypeDefs (
    HCORENUM *phEnum, 
    mdTypeDef rTypeDefs[],
    ULONG cMax, 
    ULONG *pcTypeDefs
);

Parameters

Parameter Description

phEnum

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

rTypeDefs

[in] The array used to store the TypeDef tokens.

cMax

[in] The maximum size of the rTypeDefs array.

pcTypeDefs

[out] The number of TypeDef tokens returned in rTypeDefs.

Return Value

HRESULT Description

S_OK

EnumTypeDefs returned successfully.

S_FALSE

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

Remarks

The TypeDef token represents a type such as a class or an interface, as well as any type added via an extensibility mechanism.

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