Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMetaDataImport::EnumMembersWithName method

Enumerates MemberDef tokens representing members of the specified type with the specified name.

Syntax


HRESULT EnumMembersWithName(
  [in, out]                                  HCORENUM  *phEnum,
  [in]                                       mdTypeDef tkTypeDef,
  [in]                                       LPCWSTR   szName,
  [out, size_is(cMax), length_is(*pcTokens)] mdToken   rgMembers[],
  [in]                                       ULONG     cMax,
  [out]                                      ULONG     *pcTokens
);

Parameters

phEnum [in, out]

A pointer to the enumerator.

tkTypeDef [in]

A TypeDef token representing the type with members to enumerate.

szName [in]

The member name that limits the scope of the enumerator.

rgMembers [out]

The array used to store the MemberDef tokens.

cMax [in]

The maximum size of the rgMembers array.

pcTokens [out]

The actual number of MemberDef tokens returned in rgMembers.

Return value

HRESULTDescription
S_OKEnumMembersWithName returned successfully.
S_FALSEThere are no MemberRef tokens to enumerate. In this case, pcTokens is 0 (zero).

 

Remarks

This method enumerates fields and methods, but not properties or events. Unlike EnumMembers, EnumMembersWithName discards all field and member tokens that do not have the specified name.

Requirements

IDL

Rometadataapi.idl

See also

IMetaDataImport

 

 

Show: