How to Handle VARIANT return type
Hi guys
Please help me out here. I never used VARIANT.
I tried to read about it ,but can not understand properly.Here is my problem.
I am using a activeX in my program .
There is a method of activeX like this.
VARIANT AcquireScanChannelData( BOOL Input = true);
Which Returns VARIANT .
If input is true, it returns a variant that contains a one-dimensional
array of float value (VARIANT structure is defined as VT_12 |
VT_ARRAY).
If input is false, it returns a variant that contains a one-dimensional
array of short valued (VARIANT structure is defined as VT_12 |
VT_ARRAY).
I need to call function like this AcquireScanChannelData(true)
My problem is that in what data type I should take returning array .
I tried float[] , * float ,but nothing working
It gives in error like
error C2440: '=' : cannot convert from 'System::Object __gc *' to
'float'
error C2440: '=' : cannot convert from 'System::Object __gc *' to
'float[]'
Please help me out here ,I am stuck badly.
|