I want to know if it is possible to handle Delphi Packed records with ctypes. I have a dll written in Delphi that is exposing some methods with stdcall convention.
On of the methods is returning a custom record packed like this:
TMapCell = packed record
Tile : Word;
Z : Shortint;
end;
When records aren't packed I could handle them in a way like this:
class TMapCell(Structure):
_fields_ = [
('Tile', c_ushort),
('Z', c_byte),
]
but when I am trying to use it I have an access violation erron
WindowsError: exception: access violation writing 0x0000112D