Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to access my C++ API via CLR method from C# application.

C++ method:int CreateEntity(double* Points);
Equivalent CLR wrapper method: int CreateEntity(double% Points);

I need to fill a number of doubles in C# app and pass it CLR method.
A list of doubles from a XML sample
HTML
<pts>0.0000000000000000,36.6508338286590030,73.3016676573180060,109.9525014859799900,146.6033353146399900</pts>


string[] vals = Values.Split(',');
double[] DVal = new double[size];
for (int itr = 0; itr < size; itr++)
     DVal[itr] = Convert.ToDouble(vals[itr]);

Object.CreateEntity(DVal); // Error CS1503


Getting the error "error CS1503: Argument 3: cannot convert from 'ref double*' to 'ref double'"

Suggestions needed. Thanks in advance.
Posted
Updated 12-Apr-16 21:46pm
v11

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900