Re: AW: Converting C/C++ DLL to Delphi

Rudy Velthuis <[email protected]>
Newsgroups gmane.comp.lang.delphi.jedi
Organization none
Message-ID <[email protected]>
Hello Delphi-JEDI,

You wrote:

>> Delphi structures are incompatible to c structures.
>> Especially when you use "packed structures" in c.
>> 
>> I tried a lot of stuff with it, and it was purely chaos.

> Delphi has four ways of aligning {$a1},{$a2},{$a4} and {$a8}

> If I understood the delphi help correctly, this means a _fixed_ alignment,
> iow 

> {$a1} all fields aligned on 1 byte	(equal to declaring record packed)
> {$a2} all fields aligned on 2 byte

No, it means that fileds larger than that will be aligned on that
size. Fields smaller will be aligned on their on size.

This is exactly how Win32 C and C++ compilers align as wel, when told
to use the same size alignment.

Also the standard alignment is the same as used in C and C++ on Win32,
nowadays.
-- 
Rudy Velthuis



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/i7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Delphi-JEDI/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.