Subject: convert from 'ref double[]' to 'ref object'
Posted By: wakeup Post Date: 4/7/2006 5:14:21 AM
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.
Thanksss


_________________________
http://www.hhdirecto.net
http://www.dechiste.com


Go to topic 42578

Return to index page 320
Return to index page 319
Return to index page 318
Return to index page 317
Return to index page 316
Return to index page 315
Return to index page 314
Return to index page 313
Return to index page 312
Return to index page 311