In your PInvoke DllImport attribute, please change the CallingConvention to Cdecl or StdCall, this will solve your problem. Hope it helps.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)