다음을 통해 공유


IMetaDataImport2::EnumMethodSpecs Method

Gets an enumerator for an array of MethodSpec tokens associated with the specified MethodDef or MemberRef token.

HRESULT EnumMethodSpecs (
        [in, out] HCORENUM      *phEnum, 
        [in]      mdToken       tk,
        [out]     mdMethodSpec  rMethodSpecs[],
        [in]      ULONG         cMax,
        [out]     ULONG         *pcMethodSpecs
); 

Parameters

  • phEnum
    [in, out] A pointer to the enumerator for rMethodSpecs.

  • tk
    [in] The MemberRef or MethodDef token that represents the method whose MethodSpec tokens are to be enumerated. If the value of tk is 0 (zero), all MethodSpec tokens in the scope will be enumerated.

  • rMethodSpecs
    [out] The array of MethodSpec tokens to enumerate.

  • cMax
    [in] The requested maximum number of tokens to place in rMethodSpecs.

  • pcMethodSpecs
    [out] The returned number of tokens placed in rMethodSpecs.

Return Value

HRESULT

Description

S_OK

EnumMethodSpecs returned successfully.

S_FALSE

phEnum has no member elements. In this case, pcMethodSpecs is set to 0 (zero).

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Used as a resource in MsCorEE.dll

.NET Framework Version: 2.0

See Also

Concepts

IMetaDataImport2 Interface

IMetaDataImport Interface