IMetaDataImport2::EnumGenericParams method (rometadataapi.h)

Gets an enumerator for an array of generic parameter tokens associated with the specified TypeDef or MethodDef token.

Syntax

HRESULT EnumGenericParams(
  [in, out] HCORENUM          *phEnum,
  [in]      mdToken           tk,
  [out]     mdGenericParam [] rGenericParams,
  [in]      ULONG             cMax,
  [out]     ULONG             *pcGenericParams
);

Parameters

[in, out] phEnum

A pointer to the enumerator.

[in] tk

The TypeDef or MethodDef token whose generic parameters are to be enumerated.

[out] rGenericParams

The array of generic parameters to enumerate.

[in] cMax

The requested maximum number of tokens to place in rGenericParams.

[out] pcGenericParams

The returned number of tokens placed in rGenericParams.

Return value

HRESULT Description
S_OK EnumGenericParams returned successfully.
S_FALSE phEnum has no member elements. In this case, pcGenericParams is set to 0 (zero).

Requirements

Requirement Value
Target Platform Windows
Header rometadataapi.h

See also

IMetaDataImport2