nonextensiblenonextensible
Указывает, что IDispatch
Реализация включает только свойства и методы, перечисленные в описании интерфейса, и не может быть расширена с помощью дополнительных элементов во время выполнения.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]
RemarksRemarks
Нерасширяемый атрибут C++ имеет те же функциональные возможности, что и нерасширяемый атрибут MIDL.The nonextensible C++ attribute has the same functionality as the nonextensible MIDL attribute.
Для использования нерасширяемости также требуется атрибут oleautomation .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 | interfaceinterface |
REPEATABLERepeatable | НетNo |
Требуемые атрибутыRequired attributes | dual и oleautomation , или dispinterface dual and oleautomation , or dispinterface |
Недопустимые атрибутыInvalid attributes | НетNone |
Дополнительные сведения о контекстах атрибутов см. в разделе Контексты атрибутов.For more information about the attribute contexts, see Attribute Contexts.
См. также разделSee also
Атрибуты IDLIDL Attributes
Атрибуты интерфейсаInterface Attributes