def check_arg_errcode(result, func, cargs):
 check_err(arg_byref(cargs))
 return result

def check_arg_errcode ( result , func , cargs ) : check_err ( arg_byref ( cargs ) ) return result
the error code is returned in the last argument .