The COM_Safety attribute indicates that a COM class can safely be used by an untrusted class. A COM class can normally only be used from trusted classes. This attribute is generated by the safe parameter of the @com.class, @com.struct, and @dll.struct directives.
Attribute Level | Generated By Directives |
Class | "safe" parameters of: @com.class @com.struct @dll.struct |
COM_Safety_attribute { u2 attribute_name_index; u4 attribute_length; u2 reserved1; }
attribute_name_index
This value must be a valid index into the constant_pool table. The constant_pool entry at that index must be the CONSTANT_Utf8_info structure representing the string "COM_Safety".
attribute_length
This value indicates the length of this attribute, excluding the initial six bytes.
reserved1
This value must be 0 (zero).