Microsoft SDK for Java

LinkUnSafe

The LinkUnsafe attribute specifies that a class is not accessible to untrusted classes. A native or COM class can normally only be used from trusted classes.

Attribute Level Generated By Directives
Class @security

LinkUnSafe_attribute {
    u2 attribute_name_index;
    u4 attribute_length;
}

The @security directive that generates this attribute has the following syntax:

@security(checkClassLinking=on)

Attribute Elements

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 "LinkUnSafe".

attribute_length

This value indicates the length of this attribute, excluding the initial six bytes, and may be 0 (zero).

Remarks

This attribute indicates that this class is explicitly declaring that it is unsafe for use by non-system (less than fully trusted) classes.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.