Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Invoking Function returning array , through OLE

Below is the code snippet from file.

private short type; // OLE.VT_* type
private boolean booleanData;
private byte    byteData;
private short   shortData;
private char    charData;
private int     intData;
private long    longData;
private float   floatData;
private double  doubleData;
private String  stringData;
private int /*long*/     byRefPtr;
private IDispatch dispatchData;
private IUnknown unknownData;

void setData(int /*long*/ pData){

switch (type) {
                       \\do something
case COM.VT_NULL :
                        \\do something
case COM.VT_BOOL :
                        \\do something
case COM.VT_I1 :
                        \\do something
case COM.VT_I2 :
                        \\do something
case COM.VT_UI2 :
                        \\do something
case COM.VT_I4 :
                        \\do something
case COM.VT_I8 :
                         \\do something
case COM.VT_R4 :
                         \\do something
case COM.VT_R8 :
                         \\do something
                         \\do something
case COM.VT_UNKNOWN :                          \\do something
case COM.VT_BSTR :
                         \\do something
default :
                          \\do something }

As seen variant supports only few datatypes.
I cant see a array here moreover there is no case statement in the setdata function which can handle the array.

A function in my COM Object is returning IDispatch array.
And whle invoking that function i am getting message " Unsupported type 1085"

I tried with calling a function which returns an array of integer, but still
I got the same error.

Am i missing something.How to invoke a method which returns an array.


Unlimited freedom, unlimited storage. Get it now

Back to the top