I am very new to programing ...
I want to save a array returned by C dll into C Sharp Array
my code is as fallows
1.C Dll
extern "C"
{
__declspec(dllexport)
int* main(int a1[], int a2[] ,int row1,int col1,int col2)
{
................................
................................
................................
int * a =(int) malloc(sizeof(int)*k);
...........................
return a;
}
}
and my c sharp program is as fallows.
[DllImport("F:\\just do it\\CUDA\\GPUMUL\\GpuMulGui\\resource\\GPUMUL.dll")]
[return: MarshalAs(UnmanagedType.LPArray )]
public static extern IntPtr main(int[] k1, int[] k2, int x, int y, int z);
public static int[] GetArray()
{
int size = 10
int x = 8
&nbs
View Complete Post