jmofthenorth
Technical User
Hi,
I was wondering. I'd like to use a function that I have written in c++ in c#. I was planning on doing this using a dll, and have basically gotten that set up, but I was wondering how I should go about addressing the input variables in C#. Specifically, my function looks like this in C++...
extern "C" __declspec(dllexport) double[] _stdcall IntegrateVector(double *y, double segwidth, int *yint){...}[/color red]
where y is a one dimensional double array that the function
and yint is a one dimensional int array, both are modified in the function.
to use this in C# I would use out or ref before the variables ie
IntegrateVector(ref double[] y, double segwidth, ref int[] yint){...}[/color red]
I'm confused as to what I should do in this case because of the language mismatch...
Jesse
I was wondering. I'd like to use a function that I have written in c++ in c#. I was planning on doing this using a dll, and have basically gotten that set up, but I was wondering how I should go about addressing the input variables in C#. Specifically, my function looks like this in C++...
extern "C" __declspec(dllexport) double[] _stdcall IntegrateVector(double *y, double segwidth, int *yint){...}[/color red]
where y is a one dimensional double array that the function
and yint is a one dimensional int array, both are modified in the function.
to use this in C# I would use out or ref before the variables ie
IntegrateVector(ref double[] y, double segwidth, ref int[] yint){...}[/color red]
I'm confused as to what I should do in this case because of the language mismatch...
Jesse