Thanks a lot for looking into it, DJBMASTER.
However, your solution did not work for me: I would always get "Empty prototype called in main".
I did get it to work by reading the manual

The case is well documented and has only to do with the use of __stdcall: because the DLL exported function is not also __stdcall the stack gets messed up.
Cheers