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::EnumFieldsWithName method
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, size_is(cMax), length_is(*pcTokens)] mdFieldDef rFields[], [in] ULONG cMax, [out] ULONG *pcTokens );
Parameters
- phEnum [in, out]
-
A pointer to the enumerator.
- tkTypeDef [in]
-
The token of the type whose fields are to be enumerated.
- szName [in]
-
The field name that limits the scope of the enumeration.
- rFields [out]
-
Array used to store the FieldDef tokens.
- cMax [in]
-
The maximum size of the rFields array.
- pcTokens [out]
-
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
|
IDL |
|
|---|
See also
Show: