Windows apps
Collapse the table of content
Expand the table of content
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::EnumFields method

Enumerates FieldDef tokens for the type referenced by the specified TypeDef token.

Syntax


HRESULT EnumFields(
  [in, out]                                  HCORENUM   *phEnum,
  [in]                                       mdTypeDef  tkTypeDef,
  [out, size_is(cMax), length_is(*pcTokens)] mdFieldDef rgFields[],
  [in]                                       ULONG      cMax,
  [out]                                      ULONG      *pcTokens
);

Parameters

phEnum [in, out]

A pointer to the enumerator.

tkTypeDef [in]

The TypeDef token of the class whose fields are to be enumerated.

rgFields [out]

The list of FieldDef tokens.

cMax [in]

The maximum size of the rgFields array.

pcTokens [out]

The actual number of FieldDef tokens returned in rgFields.

Return value

HRESULTDescription
S_OKEnumFields returned successfully.
S_FALSEThere are no fields to enumerate. In this case, pcTokens is 0 (zero).

 

Requirements

IDL

Rometadataapi.idl

See also

IMetaDataImport

 

 

Show:
© 2017 Microsoft