分享方式:


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(){}
};

需求

屬性內容
適用於 interface
可重複 No
必要屬性
無效屬性

如需有關屬性內容的詳細資訊,請參閱 屬性內容

另請參閱

IDL 屬性
介面屬性