IMetaDataImport::EnumCustomAttributes 方法
枚举与指定的类型或成员关联的自定义特性定义标记。
HRESULT EnumCustomAttributes (
[in, out] HCORENUM *phEnum,
[in] mdToken tk,
[in] mdToken tkType,
[out] mdCustomAttribute rCustomAttributes[],
[in] ULONG cMax,
[out, optional] ULONG *pcCustomAttributes
);
参数
phEnum
[in, out] 指向返回枚举数的指针。tk
[in] 枚举范围的标记;如果范围为所有自定义特性,则为零。tkType
[in] 要枚举的特性类型的标记;如果要枚举所有类型,则为零。rCustomAttributes
[out] 一个自定义特性标记的数组。cMax
[in] rCustomAttributes 数组的最大大小。pcCustomAttributes
[out, optional] rCustomAttributes 中实际返回的标记值数。
返回值
HRESULT |
说明 |
---|---|
S_OK |
EnumCustomAttributes 已成功返回。 |
S_FALSE |
没有要枚举的自定义特性。 在这种情况下,pcCustomAttributes 将为零。 |
要求
**平台:**请参见 .NET Framework 系统要求。
**头文件:**Cor.h
**库:**作为一项资源包含在 MsCorEE.dll 中
**.NET Framework 版本:**4、3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0、1.1、1.0