传入参数 C++:double*——C#:double[]
C++代码块:
//.cpp
//将传入的数组所有值增加1后返回
_declspec(dllexport) void test_double_group(double *test, int num)
{
int j = 1;
for (int i = 0; i <num; i++)
{
test[i] += 1;
}
}
//.h
extern "C" _declspec(dllexport) void test_double_group(double *test, int num);
C#代码块
class DLLImportHelper
{
[DllImport("SWAP_DLL.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void