On 18 Dec 2009, at 13:39, Lukas Gradl wrote:
> rMonitor=packed record
...
end;
rMonitorEx=packed record
dwMonitorSize:DWORD;
Monitor:rMonitor;
end;
Are you sure the C record is packed too ? This would mean that all
function pointers in rMonitor are not aligned.
I'm not shure about that as I'm not that good at C. The packed
record works at 32bit -so I thought that should be correct.
You must never use a "packed" record for a C record, unless it is
declared in C using __attribute__((__packed__)). The fact that it
worked in 32 bit was pure coincidence. You also have to add
{$packrecords c} to your source file to tell the compiler to lay out
records the same way as C compilers to guarantee interoperability.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal