Microsoft SDK for Java

MCDispMethod

The MCDispMethod structure describes an OLE Automation method or property.

DispMethod_attribute {
    u2 IIDIndex;
    u4 Dispid;
    u2 disptype;    
    u2 dispname;    
    u2 nArguments;
    MCVarTypeDesc RetType;
    MCVarTypeDesc aParamType[nArguments];
};

The C structure MCDispMethod, declared in comattr.h, defines the layout of this attribute for use in C/C++ programs.

Structure Elements

IIDIndex

This field must be a valid index into the GUID pool and denotes the IID through which this method is exposed. Typically, the IID is IID_IDispatch, but it can be any COM interface that derives from IDispatch.

Dispid

Indicates the dispatch identifier (DISPID) of this method or property.

disptype

This value represents the wFlags parameter used by the IDispatch::Invoke method and indicates the dispatch type. It may be one of the values listed in the following table. These flags are defined in the OLEAUTO.H header file supplied with Microsoft® Visual C++® and the MSDN™ Library.

Disptype Definitions

Name Value Comments
DISPATCH_METHOD 0x1 Indicates that this method corresponds to an IDispatch method invocation.
DISPATCH_PROPERTYGET 0x2 Indicates that this method corresponds to an IDispatch property get.
DISPATCH_PROPERTYPUT 0x4 Indicates that this method corresponds to an IDispatch property put.
DISPATCH_PROPERTYPUTREF 0x8 Indicates that this method corresponds to an IDispatch property put by-reference.

dispname

If this value is non-zero, it must be a valid index into the constant pool and the index must reference a CP_Utf8 that provides the method name. This field is required only if this MCDispMethod is referenced by a COM_ExposedAs_Group attribute.

nArguments

The number of arguments.

RetType

Describes the type of the return value.

aParamType[nArguments]

Describes the type of each parameter.

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