On Fri, 4 Feb 2011, Marcos Douglas wrote:

Hi,
I'm trying to use h2pas in wkhtmltopdf's headers... but I'm found many erros.
Could you help me to translate the headers to use in Pascal?

Command: h2pas libwkhtmltox-0.10.0_rc2\include\wkhtmltox\pdf.h -l
wkhtmltox0.dll -o wkhtmltox0.pas -p
Enviroment: WinXP SP3 and FPC 2.4.3.
Project: http://code.google.com/p/wkhtmltopdf/
Files: 
http://code.google.com/p/wkhtmltopdf/downloads/detail?name=libwkhtmltox-0.10.0_rc2.zip&can=2&q=


With an editor, open pdf.h, and replace the CAPI macro with an empty string.

Then, run

h2pas libwkhtmltox-0.10.0_rc2\include\wkhtmltox\pdf.h -l wkhtmltox0.dll -o 
wkhtmltox0.pas -D -p

(do not forget the -D)

If you're on windows, open the file and do a search and replace:
cdecl
with
{$ifdef MSWINDOWS}stdcall{$else}cdecl{$endif}

Then it should function.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to