Microsoft SDK for Java

MCVarTypeDesc

The MCVarTypeDesc structure describes the type of a single parameter or return value of an IDispatch method.

VarTypeDesc_attribute {
    u1 type;
    u2 optname;
    u1 Flags;
}

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

Structure Elements

type

Contains a compressed VARTYPE value, as defined by the VTD enumeration values table.

optname

If non-zero, this field must be a constant-pool index to a CP_Utf8 that gives the parameter name. This field is optional.

Flags

These are grouped into in/out flags and threading-model flags. Legal values for this parameter are defined by the MCTypeDesc Flags table.

VTD Enumeration Values

Name Value Comments
VTD_EMPTY 0 A void (applicable only to return type).
VTD_NULL 1 An invalid type.
VTD_I2 2 A signed 16-bit integer.
VTD_I4 3 A signed 32-bit integer.
VTD_R4 4 A 32-bit IEEE floating number.
VTD_R8 5 A 64-bit IEEE floating number.
VTD_CY 6 A 64-bit fixed-point number used for a currency data type.
VTD_DATE 7 A 64-bit floating-point fractional number indicating the number of days since December 30, 1899.
VTD_BSTR 8 A BSTR, a length-prefixed OLE automation string data type.
VTD_DISPATCH 9 A pointer to an IDispatch interface.
VTD_ERROR 10 An HRESULT, a built-in error type.
VTD_BOOL 11 A data item that can have a value of true (0xff) or false (0). The size of this item corresponds to an unsigned character.
VTD_VARIANT 12 A VARIANT pointer.
VTD_UNKNOWN 13 A pointer to an interface that is not derived from IDispatch. Any interface can be represented by its IUnknown interface.
VTD_UI1 17 An unsigned 8-bit character.
Modifiers to VTD Types: Two modifier bits can be applied to the previous VTD-defined types that affect their interpretation.
Name Value Comments
VTD_ARRAY 0x40 The parameter or return type is a SAFEARRAY pointer (an array of one of the VTD-defined types).
VTD_BYREF 0x80 The parameter or return type is passed by reference rather than by value.

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