Hai,

I am using MS Chart control in VC. To assign values, SetChartData(const VARIANT &) function has to be called with VARIANT data type as parameter. I want to pass array of integers.

so i have written code as follows

short num[5]={20,10,30,40,25};
VARIANT vari;
vari.vt = VT_I2|VT_BYREF;
vari.piVal = num;
SetChartData(vari);

But i am getting run time exception error "bad function argument".

can any one help me please
thanks in advance
chandru