stdcall was indeed the issue, it works fine with cdecl instead ! many thanks to you !