IMetaDataImport::EnumMethodsWithName method (rometadataapi.h)

Enumerates methods that have the specified name and that are defined by the type referenced by the specified TypeDef token.

Syntax

HRESULT EnumMethodsWithName(
  [in, out] HCORENUM       *phEnum,
  [in]      mdTypeDef      tkTypeDef,
  [in]      LPCWSTR        szName,
  [out]     mdMethodDef [] rgMethods,
  [in]      ULONG          cMax,
  [out]     ULONG          *pcTokens
);

Parameters

[in, out] phEnum

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

[in] tkTypeDef

A TypeDef token representing the type whose methods to enumerate.

[in] szName

The name that limits the scope of the enumeration.

[out] rgMethods

The array used to store the MethodDef tokens.

[in] cMax

The maximum size of the rgMethods array.

[out] pcTokens

The number of MethodDef tokens returned in rgMethods.

Return value

HRESULT Description
S_OK EnumMethodsWithName returned successfully.
S_FALSE There are no tokens to enumerate. In this case, pcTokens is 0 (zero).

Remarks

This method enumerates fields and methods, but not properties or events. Unlike EnumMethods, EnumMethodsWithName discards all method tokens that do not have the specified name.

Requirements

Requirement Value
Target Platform Windows
Header rometadataapi.h

See also

IMetaDataImport