LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone help me with activex and variants?

This is the activex function,
 
HRESULT CVIFUNC DATAQSDKLib__DDataqSdkGetData (CAObjHandle objectHandle, ERRORINFO *errorInfo, VARIANT *returnValue);
ERRORINFO *errorInfo;
VARIANT my_data_1;
error_code = DATAQSDKLib__DDataqSdkGetData (dataq_handle, errorInfo, &my_data_1);
 
Does anyone know how do I get the data out of my_data_1?
0 Kudos
Message 1 of 3
(3,627 Views)

Look under the library menu for ActiveX Library.  In it you will find a section name Variant Related Functions which can be used to assign and retrieve values from the variant format.  In that section you will find Querying the type of a variant.  Use the entry for Variant Get Type which is the function CA_VariantGetType() to determine what the variant variable holds.   You can then look under Retrieving values from Variants for the function to assign the value to the more familiar C types, such as CA_VariantGetFloat() if the variant holds a float.

0 Kudos
Message 2 of 3
(3,589 Views)
Greetings jeff at HCT!  Thanks for contacting National Instruments!

Have you tried exploring the "Libraries»ActiveX Library»Variant Related Functions" within the functions library in CVI?  There's a section within that library that contains all the functions necessary for extracting values from Variants. 




Message Edited by Derrick S on 10-30-2007 03:24 PM

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 3 of 3
(3,590 Views)