D to C++ DLL

Adam D. Ruppe destructionator at gmail.com
Thu Mar 13 08:35:18 PDT 2014


I didn't look closely, but since you used the "long" type my 
guess is that's the problem. long in D is always 64 bit, but in C 
is sometimes 32 bit and sometimes 64 bit.

On the D side, instead of writing "long", import 
core.stdc.config; and use c_long.

Or just use int on both sides, that should work too.


More information about the Digitalmars-d-learn mailing list