Share via


IMetaDataImport::EnumCustomAttributes Method

Enumerates custom attribute-definition tokens associated with the specified type or member.

HRESULT EnumCustomAttributes ( 
    HCORENUM    *phEnum,
    mdToken     tk, 
    mdToken     tkType, 
    mdCustomAttribute rCustomAttributes[], 
    ULONG       cMax,
    ULONG       *pcCustomAttributes
);

Parameters

Parameter Description

phEnum

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

tk

[in] A token for the scope of the enumeration, or zero for all custom attributes.

tkType

[in] A token for the type of the attributes to be enumerated, or zero for all types.

rCustomAttributes

[out] An array of custom attribute tokens.

cMax

[in] The maximum size of the rCustomAttributes array.

pcCustomAttributes

[out, optional] The actual number of token values returned in rCustomAttributes.

Return Value

HRESULT Description

S_OK

EnumCustomAttributes returned successfully.

S_FALSE

There are no custom attributes to enumerate. In that case, pcCustomAttributes is zero.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Included as a resource in Mscoree.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface
IMetaDataImport2 Interface