views:

1352

answers:

6

A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the .h header file to delphi/pascal was posted to a mailing list I was on recently, so I thought I'd share it, and invite others to post other useful resources for this, whether they be links, conversion tools, or book/paper titles.

One resource per answer please, so we'll end up with the most popular/best resources bubbling to the top.

+6  A: 

Article at Rudy's Delphi Corner

Graza
+1  A: 

HeadConv from DrBob is used quite a lot too, although I concur with Graza that manual translation is best.

PatrickvL
+1  A: 

Also, CodeGear hosts a rudimentary translation tool called CToPas (written by Ural Gunaydin).

PatrickvL
A: 

use this option so the byte alignment is the same as C/C++ and then you don't need to add padding bytes in structs.

{$MINENUMSIZE 4}

X-Ray
A: 

I would like to highlight the Jedi Api Library, it is the Delphi translation of the Windows SDK headers. Might save you a lot of work if you need to translate headers from the SDK and is of course a good sample of conversions!

Remko
+3  A: 
Mick