nonextensible
Specifies that the IDispatch
implementation includes only the properties and methods listed in the interface description and cannot be extended with additional members at run time.
Syntax
[nonextensible]
Remarks
The nonextensible C++ attribute has the same functionality as the nonextensible MIDL attribute.
Use of nonextensible also requires the oleautomation attribute.
Example
The following code shows one use of the nonextensible attribute:
// cpp_attr_ref_nonextensible.cpp
// compile with: /LD
#include "unknwn.h"
[module(name="ATLFIRELib")];
[export] typedef long HRESULT;
[dual, nonextensible, ms_union, oleautomation,
uuid("00000000-0000-0000-0000-000000000001")]
__interface IFireTabCtrl
{
HRESULT procedure (int i);
};
Requirements
Attribute context | Value |
---|---|
Applies to | interface |
Repeatable | No |
Required attributes | dual and oleautomation , or dispinterface |
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