This is how it looks like in C++:
[DllImportAttribute("Win32DLLRecon.dll", CharSet=CharSet::Auto, CallingConvention=CallingConvention::StdCall)]
extern "C" void proc1
(__int32 *i1,
__int16 *i2,
__int16 *i3,
char *i4,
unsigned *i5,
unsigned char *o1,
unsigned __int16 *o2,
float *o3);
where i = input , o = output
What would be C# equivalent?
I tried to specify like arrays, for example "out Byte [] output", but it complains that it needs byte*, not byte[] ( I do need to use pointers at the code).
EDIT:
What will happen if I just declare my whole class as unsafe and pass these as pointers: extern proc (out Byte* output, etc)?
I believe that you need to use a System.IntPtr
for this, or a System.IntPtr[]
for a true array.