title | description | ms.assetid | keywords | topic_type | api_name | api_type | ms.topic | ms.date | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
nonextensible attribute |
The \ nonextensible\ attribute 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. |
5fcffa65-4f0c-4180-a6c2-f68d63ff99ae |
|
|
|
|
reference |
05/31/2018 |
The [nonextensible] attribute 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. (By default, Automation assumes that interfaces may add members at run time; that is, it assumes they are extensible.)
[
uuid(uuid-number),
nonextensible
[, optional-attribute-list]
]
interface | dispinterface interface-name
{
interface-definition
}
-
uuid-number
-
Specifies a universally unique identification number for the interface.
-
optional-attribute-list
-
Specifies a list of zero or more MIDL interface attributes.
-
interface-name
-
Specifies the name of the interface or dispinterface.
-
interface-definition
-
Specifies IDL statements that form the definition of the interface or dispinterface.
You can apply the [nonextensible] attribute to either an interface or a dispinterface. However, an interface must also have the [dual] and [oleautomation] attributes.
TYPEFLAG_FNONEXTENSIBLE
library Hello
{
[
uuid(12345678-1234-1234-1234-123456789ABC),
helpstring("A helpful description."),
oleautomation,
dual,
nonextensible
]
interface IHello : IDispatch
{
// Interface definition statements.
}
}