I have a DLL that uses arguments that are pointers:
I can fix the array syntax but what do I do about the pointers?
Visual Studio tells me :
Error 1 Pointers and fixed size buffers may only be used in an unsafe context
TIA
C++ prototype:
void __cdecl Rgp(double X[], double Y[], double *slope, double *offset, int32_t n_input);
I can fix the array syntax but what do I do about the pointers?
C# prototype:
[DllImport("linearize_r01.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void Rgp(
double[] X,
double[] Y,
double *slope,
double *offset,
Int32 n_input);
Visual Studio tells me :
Error 1 Pointers and fixed size buffers may only be used in an unsafe context
TIA