IMetaDataImport::EnumTypeDefs method (rometadataapi.h)

Enumerates TypeDef tokens representing all types within the current scope.

Syntax

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

Parameters

[in, out] phEnum

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

[out] rgTypeDefs

The array used to store the TypeDef tokens.

[in] cMax

The maximum size of the rgTypeDefs array.

[out, retval] pcTypeDefs

The number of TypeDef tokens returned in rgTypeDefs.

Return value

HRESULT Description
S_OK EnumTypeDefs returned successfully.
S_FALSE There are no tokens to enumerate. In this case, pcTypeDefs is 0 (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

Requirement Value
Target Platform Windows
Header rometadataapi.h

See also

IMetaDataImport