You have a structure that takes a byte array
byte[]
however, the size of this array depends on the image you are sending (wid thanksheight)
So ... how do you do it
[MarshalAs(UnmanagedType.ByValArray, SizeConst = ???)] public Byte[] ImageData;
Is sizeconst MUST HAVE when working with byte arrays passed from C # to C dll?
arrays c # marshalling size
Olewolfe
source share