Share via


odl

インターフェイスをオブジェクト記述言語 (ODL) インターフェイスとして識別します。 MIDL コンパイラには odl 属性は必要ありません。以前の .odl ファイルとの互換性のためにのみ認識されます。

構文

[odl]

解説

odl C++ 属性には、odl MIDL 属性と同じ機能があります。

// cpp_attr_ref_odl.cpp
// compile with: /LD
#include <unknwn.h>
[module(name="MyLIb")];

[odl, oleautomation, dual, uuid("00000000-0000-0000-0000-000000000001")]
__interface IMyInterface
{
   HRESULT x();
};

[coclass, uuid("00000000-0000-0000-0000-000000000002")]
class cmyClass : public IMyInterface
{
public:
   HRESULT x(){}
};

必要条件

属性コンテキスト Value
適用対象 interface
反復可能 いいえ
必要な属性 なし
無効な属性 なし

属性コンテキストの詳細については、「 属性コンテキスト」を参照してください。

関連項目

IDL 属性
インターフェイス属性