ComEventInterfaceAttribute クラス
アセンブリ: mscorlib (mscorlib.dll 内)
![構文](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
<AttributeUsageAttribute(AttributeTargets.Interface, Inherited:=False)> _ <ComVisibleAttribute(True)> _ Public NotInheritable Class ComEventInterfaceAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Interface, Inherited=false)] [ComVisibleAttribute(true)] public sealed class ComEventInterfaceAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Interface, Inherited=false)] [ComVisibleAttribute(true)] public ref class ComEventInterfaceAttribute sealed : public Attribute
![解説](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
この属性は、タイプ ライブラリをインポートするときに タイプ ライブラリ インポータ (Tlbimp.exe) が基本的に自動適用しますが、インターフェイスに適用することもできます。
ソース インターフェイスがタイプ ライブラリからインポートされると、実装されているメソッドはすべて、生成されたイベント インターフェイスにイベントとして追加されます。ComEventInterfaceAttribute は Tlbimp.exe によってイベント インターフェイスに適用されます。これによって、イベント インターフェイスのメソッドを実装し、元のソース インターフェイスを実装するマネージ クラスを識別します。共通言語ランタイムは実行時にこの属性を使用して以下の処理を行います。
この属性を使用することはほとんどありません。ただし、Tlbimp.exe が生成するメタデータを詳しく再現するソース コードを作成する場合は、元のソース インターフェイスそれぞれにつきイベント インターフェイスを作成する必要があります。Tlbimp.exe によるイベントのインポートの詳細については、「インポート メンバの変換」を参照してください。COM のイベントを .NET クライアントに公開する方法については、「方法 : COM ソースによって発生したイベントを処理する」を参照してください。
![継承階層](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
System.Attribute
System.Runtime.InteropServices.ComEventInterfaceAttribute
![スレッド セーフ](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
![プラットフォーム](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
![バージョン情報](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
![参照](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
- ComEventInterfaceAttribute クラスのページへのリンク