ertank 28 Posted Wednesday at 03:52 PM Hi, There is a DLL that has demo project in C#.NET code that I would like to convert into Delphi public struct AcquirerAmount { public uint id; public ulong amount; } public struct InposEcrPayment { public const ushort MAX_ACQUIRER_COUNT = 8; public ulong totalAmount; public uint totalCount; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public AcquirerAmount[] acquires; } So far I converted above struct as below but data incoming is not correct. I believe that Delphi conversion is not correct. TInposAcquirerAmount = packed record Id: UInt32; Amount: UInt64; end; TInposEcrPayment = packed record TotalAmount: UInt64; TotalCount: UInt32; Acquires: Array[0..7] of TInposAcquirerAmount; end; Any help is appreciated. Thanks & Regards, Ertan Share this post Link to post
David Heffernan 2353 Posted Wednesday at 09:19 PM Remove packed and it's probably alright. Share this post Link to post
ertank 28 Posted 21 hours ago Problem was indeed the packed. Removing it solved the problem. Thank you. Share this post Link to post