custom(guid, value)

Description

Indicates a custom attribute (one not defined by Automation). This feature enables the independent definition and use of attributes.

Parameters

<guid>      the standard GUID form.

<value>    a value that can be put into a variant. See also the Const directive.

Allowed on

Library, typeinfo, typlib, variable, function, parameter.

Not allowed on

A member of a coclass (IMPLTYPE).

Representation

Can be retrieved using:

ITypeLib2::GetCustData
ITypeInfo2::GetCustData
ITypeInfo2::GetAllCustData
ITypeInfo2::GetFuncCustData
ITypeInfo2::GetAllFuncCustData
ITypeInfo2::GetVarCustData
ITypeInfo2::GetAllVarCustData
ITypeInfo2::GetParamCustData
ITypeInfo2::GetAllParamCustData
ITypeInfo2::GetImplTypeCustData
ITypeInfo2::GetAllImplTypeCustData

Example

The following example shows how to add a string-valued attribute that gives the ProgID for a class:

[
    custom(GUID_PROGID, "DAO.Dynaset")
]
coclass Dynaset
{
    [default] interface Dynaset;
    [default, source] interface IDynasetEvents;
}