It looks like you know nothing about calling conventions ([https://en.wikipedia.org/wiki/X86_calling_conventions)](https://en.wikipedia.org/wiki/X86_calling_conventions\)).
You need to check what calling convention uses your DLL, and set appropriate calling convention in your function declaration. Currently you declared _cdecl_, but i think (i'm not sure) that calling convention is _stdcall_.