Share via


nonextensible

指定 IDispatch 实现仅包含接口说明中列出的属性和方法,并且不能在运行时使用其他成员进行扩展。

语法

[nonextensible]

备注

nonextensible C++ 特性具有与 nonextensible MIDL 特性相同的功能

使用 nonextensible 也需要 oleautomation 特性

示例

下面的代码演示了 nonextensible 特性的一种使用情形:

// 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);
};

要求

特性上下文
适用于 interface
可重复
必需的特性 dualoleautomation、或 dispinterface
无效的特性

有关特性上下文的详细信息,请参见 特性上下文

另请参阅

IDL 特性
接口特性