You may need a packed keyword. By default, Delphi will align the variables based on (I believe) whether you are developing on a 16, 32 or 64 bit platform and what data types are in your record. Using packed will change the length / size of the memory needed to store the record. C will pack the structure by default.
MY_STRUCT_1 = packed record value1 : Array [0..31] of Word; value2 : Array [0..21] of Word; value3 : Array [0..7] of Word; end;
See also: http://www.delphibasics.co.uk/RTL.asp?Name=Packed
user496736
source share