code: def _winapi(self, func, *a, **kw):
          
          self.flush()
  
          if _DEBUG_RENDER_OUTPUT:
              self.LOG.write(('%r' % func.__name__).encode('utf-8') + b'\n')
              self.LOG.write(b'     ' + ', '.join(['%r' % i for i in a]).encode('utf-8') + b'\n')
              self.LOG.write(b'     ' + ', '.join(['%r' % type(i) for i in a]).encode('utf-8') + b'\n')
              self.LOG.flush()
  
          try:
              return func(*a, **kw)
          except ArgumentError as e:
              if _DEBUG_RENDER_OUTPUT:
                  self.LOG.write(('    Error in %r %r %s\n' % (func.__name__, e, e)).encode('utf-8'))
docs: Flush and call win API function.