admconsult
Programmer
I have a program written in Borland C++ Builder v6 that I need to add an ActiveX control to. One of the ActiveX controls methods calls for VARIANT varaibles passed by reference. Here is the gist of what I have to do according to the developer of the ActiveX control.
short s1 = 1;
double d1;
VARIANT var1;
VARIANT var2;
long l1;
short ret;
ret = ActiveXControl->Method1( s1, &d1, &var1, &var2, &l1 );
The ActiveX control should return a short return code and assign the variant and long values to the variables using reference. The method is called, but nothing happens. The return code is set to 0, but it is not returned by the ActiveX control's method. The other variables are not initialized at all by the method, and according to the ActiveX developer, this cannot happen if the method is executed. He wrote the ActiveX control using Visual C++ and thinks the problem could be related to the VARIANT data type implemented by Borland C++ Builder. I've heard a few other developers have had issues with Borland VARIANT data type, but have not found any possible solutions yet. Does anyone have any ideas on what I can try?
short s1 = 1;
double d1;
VARIANT var1;
VARIANT var2;
long l1;
short ret;
ret = ActiveXControl->Method1( s1, &d1, &var1, &var2, &l1 );
The ActiveX control should return a short return code and assign the variant and long values to the variables using reference. The method is called, but nothing happens. The return code is set to 0, but it is not returned by the ActiveX control's method. The other variables are not initialized at all by the method, and according to the ActiveX developer, this cannot happen if the method is executed. He wrote the ActiveX control using Visual C++ and thinks the problem could be related to the VARIANT data type implemented by Borland C++ Builder. I've heard a few other developers have had issues with Borland VARIANT data type, but have not found any possible solutions yet. Does anyone have any ideas on what I can try?