Re: using wkhtmltopdf with D

2018-05-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 04:49:34 UTC, Nicholas Wilson wrote: On Tuesday, 29 May 2018 at 01:43:17 UTC, Mike Parker wrote: In pdf.h, that CAPI macro is used in every function declaration. That means that on Windows, all of the functions have the __stdcall calling convention (which, in D,

Re: using wkhtmltopdf with D

2018-05-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 01:43:17 UTC, Mike Parker wrote: In pdf.h, that CAPI macro is used in every function declaration. That means that on Windows, all of the functions have the __stdcall calling convention (which, in D, would be extern(Windows)) and the standard cdecl calling convetion

Re: using wkhtmltopdf with D

2018-05-28 Thread Mike Parker via Digitalmars-d-learn
On Monday, 28 May 2018 at 21:05:00 UTC, Dr.No wrote: On Monday, 28 May 2018 at 02:10:48 UTC, sarn wrote: On Monday, 28 May 2018 at 01:28:10 UTC, Dr.No wrote: What's likely the reason of the crash? mismatch between D and C memory alignment? From an ABI point of view, the raw pointers won't

Re: using wkhtmltopdf with D

2018-05-28 Thread Dr.No via Digitalmars-d-learn
On Monday, 28 May 2018 at 02:10:48 UTC, sarn wrote: On Monday, 28 May 2018 at 01:28:10 UTC, Dr.No wrote: What's likely the reason of the crash? mismatch between D and C memory alignment? From an ABI point of view, the raw pointers won't care about the memory structure they point to. The

Re: using wkhtmltopdf with D

2018-05-27 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 28 May 2018 at 01:28:10 UTC, Dr.No wrote: I'm trying to use wkhtmltopdf[1] with D. I converted this header[2] with little modification using htod tool which resulted in this[3]. The libray is passed to link using: pragma(lib, "wkhtmltox.lib"); (that file is in wkhtmltopdf\lib

Re: using wkhtmltopdf with D

2018-05-27 Thread sarn via Digitalmars-d-learn
On Monday, 28 May 2018 at 01:28:10 UTC, Dr.No wrote: What's likely the reason of the crash? mismatch between D and C memory alignment? From an ABI point of view, the raw pointers won't care about the memory structure they point to. The function call is the only thing that depends on the