odl
Identifies an interface as an Object Description Language (ODL) interface. The MIDL compiler does not require the odl attribute; it is recognized only for compatibility with older .odl files.
Syntax
[odl]
Remarks
The odl C++ attribute has the same functionality as the odl MIDL attribute.
Example
// 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(){}
};
Requirements
Attribute context | Value |
---|---|
Applies to | interface |
Repeatable | No |
Required attributes | None |
Invalid attributes | None |
For more information about the attribute contexts, see Attribute Contexts.
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho