I developed a c++ ATL com dll. I'm trying to use it in C#.
In C# I have a method with a parametr of "ref object" type (in C++ is a VARIANT* I convert it to SAFEARRAY of doubles).
For use this method I create a double variable but it throws me this error:
Argument '3': cannot convert from 'ref double' to 'ref object'
If I create
object x =null;
And after call to method I execute: double myarray = (double ) x;
It run ok, but I would like avoid those steps.