Share via


IMetaDataImport::EnumTypeSpecs Method

Enumerates TypeSpec tokens defined in the current metadata scope.

HRESULT EnumTypeSpecs (
   [in, out] HCORENUM    *phEnum,
   [out] mdTypeSpec      rTypeSpecs[],
   [in]  ULONG           cMax,
   [out] ULONG           *pcTypeSpecs
);

Parameters

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

  • rTypeSpecs
    [out] The array used to store the TypeSpec tokens.

  • cMax
    [in] The maximum size of the rTypeSpecs array.

  • pcTypeSpecs
    [out] The number of TypeSpec tokens returned in rTypeSpecs.

Return Value

HRESULT

Description

S_OK

EnumTypeSpecs returned successfully.

S_FALSE

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

Remarks

The TypeSpec tokens are created by the IMetaDataEmit::GetTokenFromTypeSpec method.

Requirements

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

See Also

Reference

IMetaDataImport Interface

IMetaDataImport2 Interface