how to marshal c++ DLL's float** in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vishalamca
    New Member
    • Nov 2008
    • 1

    #1

    how to marshal c++ DLL's float** in C#

    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 code looks like -

    C++

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


    return myNetwork->GetBayesData(C urretNode, SliderPosition) ;


    }

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



    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

    Can someone please help me.

    Basically I am trying to send a 2D array from C++ to C# by using flaot**.
    If there is any other easier way other than using float**, please let me know.

    Thanks in advance,

    Vishala.
Working...