C# - How to interop C++ DLL's 2D array in C#

Joined
Nov 3, 2008
Messages
1
Reaction score
0
hi,

I am very new to .net technologies. I have to write c++ dll which returns a 2-dimensional array of float (probably I return it as float** from c++) and use it in C# website.

here is how my C++ code looks like -



float** getData(int CurretNode, int SliderPosition){

//return float array


}

-------------------



and C# side,

I know how to process with 1-D array but not sure of 2-D array :-(

I am trying to use IntPtr and
System.Runtime.InteropServices.Marshal.Copy but no luck.

Can someone please help me.

Thanks in advance,

Vishala.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,588
Members
45,095
Latest member
EmiliaAlfo

Latest Threads

Top