Skip to content

Latest commit

 

History

History
79 lines (58 loc) · 2.57 KB

imetadataimport-enummembers-method.md

File metadata and controls

79 lines (58 loc) · 2.57 KB
description title ms.date api_name api_location api_type f1_keywords helpviewer_keywords ms.assetid topic_type
Learn more about: IMetaDataImport::EnumMembers Method
IMetaDataImport::EnumMembers Method
03/30/2017
IMetaDataImport.EnumMembers
mscoree.dll
COM
IMetaDataImport::EnumMembers
IMetaDataImport::EnumMembers method [.NET Framework metadata]
EnumMembers method [.NET Framework metadata]
3fb8e178-342b-4c89-9bcf-f7f834e6cb77
apiref

IMetaDataImport::EnumMembers Method

Enumerates MemberDef tokens representing members of the specified type.

Syntax

HRESULT EnumMembers (
   [in, out]  HCORENUM    *phEnum,
   [in]  mdTypeDef   cl,
   [out] mdToken     rMembers[],
   [in]  ULONG       cMax,
   [out] ULONG       *pcTokens  
);  

Parameters

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

cl
[in] A TypeDef token representing the type whose members are to be enumerated.

rMembers
[out] The array used to hold the MemberDef tokens.

cMax
[in] The maximum size of the rMembers array.

pcTokens
[out] The actual number of MemberDef tokens returned in rMembers.

Return Value

HRESULT Description
S_OK EnumMembers returned successfully.
S_FALSE There are no MemberDef tokens to enumerate. In that case, pcTokens is zero.

Remarks

When enumerating collections of members for a class, EnumMembers returns only members (fields and methods, but not properties or events) defined directly on the class. It does not return any members that the class inherits, even if the class provides an implementation for those inherited members. To enumerate inherited members, the caller must explicitly walk the inheritance chain. Note that the rules for the inheritance chain may vary depending on the language or compiler that emitted the original metadata.

Properties and events are not enumerated by EnumMembers. To enumerate those, use EnumProperties or EnumEvents.

Requirements

Platforms: See System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: [!INCLUDEnet_current_v10plus]

See also