--- title: "custom (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.custom" dev_langs: - "C++" helpviewer_keywords: - "custom attributes, defining" ms.assetid: 3abac928-4d55-4ea6-8cf6-8427a4ad79f1 caps.latest.revision: 12 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" --- # custom (C++) Defines metadata for an object in the type library. ## Syntax ``` [ custom( uuid, value ) ]; ``` #### Parameters *uuid* A unique ID. *value* A value that can be put into a variant. ## Remarks The **custom** C++ attribute will cause information to be placed into the type library. You will need a tool that reads the custom value from type library. The **custom** attribute has the same functionality as the [custom](http://msdn.microsoft.com/library/windows/desktop/aa366766) MIDL attribute. ## Requirements ### Attribute Context ||| |-|-| |**Applies to**|Non-COM `interface`, **class**, `enum`s, `idl_module` methods, interface members, interface parameters, `typedef`s, **union**s, `struct`s| |**Repeatable**|Yes| |**Required attributes**|**coclass** (when used on class)| |**Invalid attributes**|None| For more information about the attribute contexts, see [Attribute Contexts](../windows/attribute-contexts.md). ## See Also [IDL Attributes](../windows/idl-attributes.md) [Stand-Alone Attributes](../windows/stand-alone-attributes.md) [Typedef, Enum, Union, and Struct Attributes](../windows/typedef-enum-union-and-struct-attributes.md) [Parameter Attributes](../windows/parameter-attributes.md) [Method Attributes](../windows/method-attributes.md) [Class Attributes](../windows/class-attributes.md) [Interface Attributes](../windows/interface-attributes.md)