分享方式:


nonextensible

指定實作 IDispatch 只包含介面描述中所列的屬性和方法,而且無法在執行時間與其他成員一起擴充。

語法

[nonextensible]

備註

不可延伸 的 C++ 屬性具有與不可延伸 MIDL 屬性相同的功能

使用不可擴充 也需要 oleautomation 屬性。

範例

下列程式碼顯示一個 使用不可擴充 的屬性:

// 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
可重複 No
必要屬性 dualoleautomation 、 或 dispinterface
無效屬性

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

另請參閱

IDL 屬性
介面屬性