The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

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.


The nonextensible C++ attribute has the same functionality as the nonextensible MIDL attribute.

Use of nonextensible also requires the oleautomation attribute.

The following code shows one use of the nonextensible attribute:

// cpp_attr_ref_nonextensible.cpp  
// compile with: /LD  
#include "unknwn.h"  
[export] typedef long HRESULT;  
[dual, nonextensible, ms_union, oleautomation,   
__interface IFireTabCtrl  
   HRESULT procedure (int i);   

Attribute Context

Applies tointerface
Required attributesdual and oleautomation, or dispinterface
Invalid attributesNone

For more information about the attribute contexts, see Attribute Contexts.

IDL Attributes
Interface Attributes
Attributes Samples