Fix #903: respect stdcall calling convention on ctypes functions (Windows)

Also fix an error to give a better message.