custom (C++)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

Defines metadata for an object in the type library.

  
      [ custom(  
   uuid,   
   value  
) ];  

Parameters

uuid
A unique ID.

value
A value that can be put into a variant.

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 MIDL attribute.

Attribute Context

Applies toNon-COM interface, class, enums, idl_module methods, interface members, interface parameters, typedefs, unions, structs
RepeatableYes
Required attributescoclass (when used on class)
Invalid attributesNone

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

IDL Attributes
Stand-Alone Attributes
Typedef, Enum, Union, and Struct Attributes
Parameter Attributes
Method Attributes
Class Attributes
Interface Attributes
Attributes Samples

Show: