On 2/15/13, Andrey <[email protected]> wrote:
> // pascal model is the same that stdcall
> export extern(Pascal) // full analog of STDCALL

No it's not, pascal parameters are pushed left-to-right, stdcall does
it the other way around. Try using extern(Windows) here and see if
that works.

See http://en.wikipedia.org/wiki/X86_calling_conventions#pascal and
http://en.wikipedia.org/wiki/X86_calling_conventions#stdcall .

Also see Agner's detailed calling convention PDF:
www.agner.org/optimize/calling_conventions.pdf

Reply via email to