IMetaDataImport::EnumTypeDefs Method

Enumerates TypeDef tokens representing all types within the current scope.

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

Parameters

  • 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: See .NET Framework System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface

IMetaDataImport2 Interface