Bad DLL calling convention
You are using a C-callout function to call a DLL entry point with a different calling convention than the one used to implement the DLL entry point.
Define the correct argument-passing protocol in the C-callout function to implement the DLL entry point.