LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

OOPS - I need help with VARIANT functions

I am so sorry about the multiple posts. Something happened to my keyboard ??!!
 
My question relates to the use of the VARIANT functions. I am trying to fill in the data for the function -
 
       HRESULT CVIFUNC SMIENGINELib_ISMIPathGenerateLinePath (CAObjHandle objectHandle,
                                                       ERRORINFO *errorInfo,
                                                       double maxSpeed,
                                                       VARIANT endpoint,
                                                       VARIANT *dataPairs);
 
I need to convert a 1 dim array of (5) doubles to the VARIANT endpoint (VARIANT *datapairs will be NULL). Can someone show me how to do this or point me to some documentation that explains how to use VARIANTS. Both would be nice. I've never used VARIANTS in C before. Thanks for the help.
 
 
0 Kudos
Message 1 of 2
(2,818 Views)

All functions related to conversione to and from variants can be found into the ActiveX library, classes Assignign values to variants and Retrieving values form variants.

What you need in this moment is CA_VariantSet1DArray (&varDblAry, CAVT_DOUBLE, 6, array); passing the varDblAry to the function.

For an example on transferring arrays with variants you could look at the excel demo in <cvidir>\samples\activex\excel directory.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,801 Views)