共用方式為


IMetaDataImport::EnumCustomAttributes Method

列舉與指定類型或成員相關聯的自定義屬性定義令牌。

Syntax

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

Parameters

phEnum [in, out]傳回列舉值的指標。

tk [in]列舉範圍的標記,或所有自定義屬性的零。

tkType [in]要列舉之屬性型別之建構函式的標記,或 null 針對所有型別。

rCustomAttributes [out]自訂屬性令牌的陣列。

cMax [in]數位大小 rCustomAttributes 上限。

pcCustomAttributes [out, 選擇性]中 rCustomAttributes傳回的實際標記值數目。

Return Value

HRESULT Description
S_OK EnumCustomAttributes 已成功傳回。
S_FALSE 沒有要列舉的自定義屬性。 在此情況下, pcCustomAttributes 為零。

Requirements

平臺: 請參閱 .NET 支援的作系統

Header: Cor.h

Library: CorGuids.lib

See also