The @com.typeinfo directive is used on a Java-implemented COM class and specifies custom data to be exposed for this class by the Microsoft virtual machine. This custom data is available by way of ITypeLib::GetCustData on type libraries obtained from the Microsoft VM for the class that declares this directive. You may declare more than one of these directives for a class.
If an @com.typeinfo directive is present, an @com.register directive must be specified.
@com.typeinfo({GUID}=number | string)
or
@com.typeinfo(attrid=GUID, value=number | string)
attrid=GUID | The GUID for the custom data. |
value= number | string | A number or string representing the custom data to associate with the given GUID. |
COM_CustData | Class scope. |
The following adds some Unicode data keyed by the specified GUID.
/** @com.typeinfo(attrid=FF0FFCC7-9BD2-1FFF-AA4F-3FFF89C0001, value="\u1234\u7689\u00AF") */ public class MyCOMObject { }
This is equivalent to:
/** @com.typeinfo({FF0FFCC7-9BD2-1FFF-AA4F-3FFF89C0001}="\u1234\u7689\u00AF") */ public class MyCOMObject { }