IMetaDataImport::EnumFieldsWithName method (rometadataapi.h)
Enumerates FieldDef tokens of the specified type with the specified name.
Syntax
HRESULT EnumFieldsWithName(
[in, out] HCORENUM *phEnum,
[in] mdTypeDef tkTypeDef,
[in] LPCWSTR szName,
[out] mdFieldDef [] rFields,
[in] ULONG cMax,
[out] ULONG *pcTokens
);
Parameters
[in, out] phEnum
A pointer to the enumerator.
[in] tkTypeDef
The token of the type whose fields are to be enumerated.
[in] szName
The field name that limits the scope of the enumeration.
[out] rFields
Array used to store the FieldDef tokens.
[in] cMax
The maximum size of the rFields array.
[out] pcTokens
The actual number of FieldDef tokens returned in rFields.
Return value
HRESULT | Description |
---|---|
S_OK | EnumFieldsWithName returned successfully. |
S_FALSE | There are no fields to enumerate. In this case, pcTokens is 0 (zero). |
Remarks
Unlike EnumFields, EnumFieldsWithName discards all field tokens that do not have the specified name.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | rometadataapi.h |