I have the following struct in C#
unsafe public struct control { public int bSetComPort; public int iComPortIndex; public int iBaudRa
SizeOf doesn't work on arrays. Use array.Length * Marshal.SizeOf(elementType) instead.
SizeOf
array.Length * Marshal.SizeOf(elementType)