On Fri, 18 Dec 2009 13:39:45 +0100
Lukas Gradl <f...@ssn.at> wrote:

> 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.
If it works on 32bit it should be correct.

> Is there a difference between 64Bit and 32Bit?
Yes.
Some types have different sizes and even the alignment is different for some 
types.
For details look here: http://www.x86-64.org/documentation.html
 
> Here is the orginal C definition, could someone take a look at this:
I cannot help you directly but I can give you a hint based on my experience 
with C-headers on 64-bit.
First you should check what types these typedefs like DWORD actually are. After 
that you can use the corresponding type from the ctypes unit of FPC. This is 
the easiest way I found to make my C-headers work correctly on 64-bit as types 
defined in this unit have the correct sizes and alignments.
For example DWORD is actually unsigned long, AFAIK. This would be culong in the 
ctypes unit.

hope it helps
R.
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to