I am using a pointer to a unsigned long array (manipulate data) then send it back to C#
in C#
[DllImport("some_dll.dll")]
private static extern uint[] func(uint[]x, uint[]y, uint[]z);
C header
_declspec(dllexport) unsigned long* _stdcall func(unsigned long[],
unsigned long[],unsigned long[]);
error
MarshalDirectiveException Cannot marshal 'return value': Invalid managed/unmanaged type combination
Kindly let me know what is causing the problem.
IntPtr
as returned value, and then useMarshal.Copy
to copy from IntPtr to uint[]. – Jigsore