G
Guest
In my managed code (C#) I have a some dozens of single dimension byte array.
I get each of this arrays from another unmanaged code (first DLL).
I need to stitch these arrays to a dual dimensions array and to be passed to
a unmanaged DLL (second DLL) that will change the values of this array. When
this unmanaged function returns from the unmanaged DLL, I'll need to use this
changed data.
I have 2 questions:
(1) How can stitch the single dimension byte arrays to a dual dimensions
array and avoiding a data copy to be used in a unmanaged code?
(2) What should the unmanaged function signature be?
e.g. void UnmanagedFuc(BYTE** buff) ???
(3) How do I use/import the unmanaged function using the DllImport?
e.g.
[DllImport(Unmanaged.dll")]
public static extern void UnmanagedFuc(ref byte[,] buff);
I get each of this arrays from another unmanaged code (first DLL).
I need to stitch these arrays to a dual dimensions array and to be passed to
a unmanaged DLL (second DLL) that will change the values of this array. When
this unmanaged function returns from the unmanaged DLL, I'll need to use this
changed data.
I have 2 questions:
(1) How can stitch the single dimension byte arrays to a dual dimensions
array and avoiding a data copy to be used in a unmanaged code?
(2) What should the unmanaged function signature be?
e.g. void UnmanagedFuc(BYTE** buff) ???
(3) How do I use/import the unmanaged function using the DllImport?
e.g.
[DllImport(Unmanaged.dll")]
public static extern void UnmanagedFuc(ref byte[,] buff);