1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
//!! Forward type references
quote(C, "enum { VT_I4, VT_UI1, VT_R4, VT_R8, VT_BOOL, VT_BSTR,
VT_I4_BYREF, VT_UI1_BYREF, VT_R4_BYREF, VT_R8_BYREF,
VT_BOOL_BYREF, VT_BSTR_BYREF }; ")
interface Test {
// A cut-down version of the VARIANT type
// defined by the Ole Automation interfaces.
typedef [string] char * BSTR;
typedef struct tagVARIANT VARIANT;
struct tagVARIANT {
unsigned int vt;
[switch_is(vt)] union {
case VT_I4: long lVal;
case VT_UI1: unsigned char bVal;
case VT_R4: float fltVal;
case VT_R8: double dblVal;
case VT_BOOL: boolean bool;
case VT_BSTR: BSTR bstrVal;
case VT_I4_BYREF: long * plVal;
case VT_UI1_BYREF: unsigned char * pbVal;
case VT_R4_BYREF: float * pfltVal;
case VT_R8_BYREF: double * pdblVal;
case VT_BOOL_BYREF: boolean * pbool;
case VT_BSTR_BYREF: BSTR * pbstrVal;
} u;
};
}
|