correcting callback function for mingw, use __stdcall