Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old April 7th, 2006, 05:14 AM
Authorized User
Join Date: Apr 2005
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default convert from 'ref double[]' to 'ref object'

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.


Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ref numbers RubyRue ASP.NET 2.0 Basics 2 January 16th, 2008 10:29 AM
Membership - Ref: Chapter 8 JayLou BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 0 April 11th, 2007 10:24 AM
Using ref in xml ooper01 XML 1 February 24th, 2007 05:10 AM
By Val By Ref B.V.Madhav Crystal Reports 1 May 12th, 2005 11:37 PM
Array to ref parameter dedex C# 4 February 12th, 2005 01:58 PM

All times are GMT -4. The time now is 03:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.