Passing Values as Variants Class Help
- Updated2023-02-21
- 1 minute(s) read
This class contains functions that you can use when working with VARIANT input parameters of ActiveX server functions. These functions allow you to pass values as variants without declaring VARIANT variables. The functions take a value of a specific type as a parameter and return a variant containing the value.
For example, assume that you have the following ActiveX Server function:
HRESULT CVIFUNC CalcMin (DispHandle dispHandle, ERRORINFO *errInfo, VARIANT a, VARIANT b, VARIANT *min);
You can pass doubles for the a and b input VARIANT parameters as follows:
VARIANT min;
CalcMin(dispH, NULL, CA_VariantDouble(5.0), CA_VariantDouble(10.0), &min);
Notice that the output VARIANT parameter, min, must be declared as a local variable.
Library: ActiveX Library