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 |
必要屬性 | dual 和 oleautomation 、 或 dispinterface |
無效屬性 | 無 |
如需有關屬性內容的詳細資訊,請參閱 屬性內容。
另請參閱
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: