IMetaDataImport::EnumCustomAttributes 方法 (rometadataapi.h)

列舉與指定類型或成員相關聯的自訂屬性定義語彙基元。

語法

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

另請參閱

IMetaDataImport