custom(guid, value)
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
Flags
None.
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;
}
Related topics