S7NetPlus / s7netplus

S7.NET+ -- A .NET library to connect to Siemens Step7 devices
MIT License
1.3k stars 580 forks source link

Cant'read struct containing array #478

Open patopat opened 1 year ago

patopat commented 1 year ago

Hi,

Could you confirm that, now, is not possible to read struct containing array defined like this, even if size of array is marshalling ?

        [StructLayout(LayoutKind.Sequential)]
        public struct DB601
        {
            // Real, addr =92.0
            public float var1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
            public byte[] var2;
            // Real, addr=120.0
            public float var3;
        }

Regards, Pat