枚举与指定类型或成员关联的自定义特性定义标记。
语法
HRESULT EnumCustomAttributes(
  [in, out] HCORENUM             *phEnum,
  [in]      mdToken              tk,
  [in]      mdToken              tkType,
  [out]     mdCustomAttribute [] rgCustomAttributes,
  [in]      ULONG                cMax,
  [out]     ULONG                *pcCustomAttributes
);
参数
[in, out] phEnum
指向返回的枚举器的指针。
[in] tk
枚举范围的标记,对于所有自定义属性,为零。
[in] tkType
要枚举的属性类型的标记,对于所有类型,为零。
[out] rgCustomAttributes
自定义属性令牌的数组。
[in] cMax
rgCustomAttributes 数组的最大大小。
[out] pcCustomAttributes
rgCustomAttributes 中返回的实际令牌值数。
返回值
| HRESULT | 说明 | 
|---|---|
| S_OK | EnumCustomAttributes 已成功返回。 | 
| S_FALSE | 没有要枚举的自定义属性。 在这种情况下, pcCustomAttributes 为 0 (零) 。 | 
要求
| 要求 | 值 | 
|---|---|
| 目标平台 | Windows | 
| 标头 | rometadataapi.h |