Skip to content

Latest commit

 

History

History
75 lines (63 loc) · 1.89 KB

File metadata and controls

75 lines (63 loc) · 1.89 KB
title object (C++) | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
vc-attr.object
dev_langs
C++
helpviewer_keywords
object attribute
ms.assetid f2d3c231-630d-4b4c-bd15-b1c30df362dd
caps.latest.revision 9
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

object (C++)

Identifies a custom interface.

Syntax

  
[object]  
  

Remarks

When preceding an interface definition, the object C++ attribute causes the interface to be placed in the .idl file as a custom interface.

Any interface marked with object must inherit from IUnknown. This condition is satisfied if any of the base interfaces inherit from IUnknown. If no base interfaces inherit from IUnknown, the compiler will cause the interface marked with object to derive from IUnknown.

Example

See nonbrowsable for an example of how to use object.

Requirements

Attribute Context

Applies to interface
Repeatable No
Required attributes None
Invalid attributes None

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

See Also

IDL Attributes
Interface Attributes
dual
dispinterface
custom
__interface