Delen via


IMetaDataImport::EnumMethodsWithName Method

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

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

Parameters

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

  • cl
    [in] A TypeDef token representing the type whose methods to enumerate.

  • szName
    [in] The name that limits the scope of the enumeration.

  • rMethods
    [out] The array used to store the MethodDef tokens.

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

  • pcTokens
    [out] The number of MethodDef tokens returned in rMethods.

Remarks

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

Return Value

HRESULT

Description

S_OK

EnumMethodsWithName returned successfully.

S_FALSE

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

Requirements

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface

IMetaDataImport2 Interface