Share via


IMetaDataEmit::DefineCustomAttribute メソッド

指定されたメタデータ署名を使用して、指定されたオブジェクトにアタッチするカスタム属性の定義を作成し、そのカスタム属性定義へのトークンを取得します。

構文

HRESULT DefineCustomAttribute (
    [in]  mdToken     tkObj,
    [in]  mdToken     tkType,
    [in]  void const  *pCustomAttribute,
    [in]  ULONG       cbCustomAttribute,
    [out] mdCustomAttribute *pcv
);  

パラメーター

tkObj
[in] 所有者項目のトークン。

tkType
[in] カスタム属性を識別するトークン。

pCustomAttribute
[in] カスタム属性へのポインター。

cbCustomAttribute
[in] pCustomAttribute のバイト数。

pcv
[out] 割り当てられた mdCustomAttribute トークン。

必要条件

:システム要件」を参照してください。

ヘッダー: Cor.h

ライブラリ: MSCorEE.dll でリソースとして使用されます

.NET Framework のバージョン: 1.0 以降で使用可能

関連項目