다음을 통해 공유


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: 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

Concepts

IMetaDataImport Interface

IMetaDataImport2 Interface