code: def _check_count(self, result, func, args):
          #pylint: disable=unused-argument
          
          if result == 0:
              raise ctypes.WinError(ctypes.get_last_error())
          return args
docs: Private function to return ctypes errors cleanly