ertank 29 Posted December 25, 2024 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 2357 Posted December 25, 2024 Remove packed and it's probably alright. 1 Share this post Link to post
ertank 29 Posted December 26, 2024 Problem was indeed the packed. Removing it solved the problem. Thank you. 1 Share this post Link to post