Sorry for not seeing this sooner. I think you might have set the wrong calling convention in the translated header file. See my answer on SO. I hope it works for you now.