Problems when using DLL-Functions

torhu fake at address.dude
Mon Jul 9 04:32:58 PDT 2007

Marc Müller wrote:
> extern(C)

Try extern (Windows) instead of extern (C) here.

> I think anything is scrambling my stack - but it is absolutely 
> unpredictable when this occurs - and I have no clue what I can do :-(
> The errors are reproducable - Version A always crashes while version B 
> never crashes.
> Do you have an Idea?

The stack getting scrambled is a tell-tale sign of using the wrong 
calling convention.  I can't find WTInfoA on, but I'm guessing 
it's a stdcall function.

More information about the Digitalmars-d-learn mailing list