Microsoft SDK for Java

COM_ExposedAs_Group

The ExposedAs_Group attribute is a collection of ExposedAs structures, each of which causes the Java method to be exposed as a COM method. It exposes a Java method to COM and prescribes the external interface (vtable or dispatch) of a COM-Callable Wrapper created for a Java object.

Attribute Level Generated By Directives
Method @com.method

COM_ExposedAs_Group_attribute {
    u2 attribute_name_index;
    u4 attribute_length;
    u2 Flags;
    u2 nExposedAs;
    {   u2 Flags;
        u2 MethodPoolIndex;
    } aExposedAs[nExposedAs];
} 

The C structures MCExposedAsGroup and MCExposedAs, declared in comattr.h, define the layout of this attribute for use in C/C++ programs.

Restrictions

The access flags for the method must be a subset of ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED, or ACC_NATIVE ACC_ABSTRACT.

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

attribute_length

This value indicates the length of this attribute, excluding the initial six bytes, and varies depending on the value of nExposedAs.

Flags

Must be 0 (zero).

nExposedAs

The number of ExposedAs attributes that follow.

Flags

This value is not currently used and must be 0 (zero).

MethodPoolIndex

This value must be a valid index into the method pool (the COM_MethodPool attribute). The method pool entry describes how to expose this Java method to COM.

aExposedAs[]

nExposedAs

The number of aExposedAs attributes that follow.

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