_set_error_mode is cdecl not stdcall.