in c++ I have such function
extern "C" _declspec(dllexport) uint8* bufferOperations(uint8* incoming, int size)
I am trying to call it from c# like this
[DllImport("MagicLib.DLL", CallingConvention = CallingConvention.Cdecl)]
//[return: MarshalAs(UnmanagedType.ByValArray)]//, ArraySubType=UnmanagedType.SysUInt)]
public static extern byte[] bufferOperations(byte[] incoming, int size);
But I get the
Cannot marshal 'return value': Invalid managed/unmanaged type combination
((( The question is - how to marshal this correctly?
Thanks for reading my question
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…