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

可重复

必需的特性

无效的特性

有关属性上下文的更多信息,请参见 属性上下文

请参见

其他资源

IDL特性

接口特性

Attributes Samples