code: def kill(self, dwExitCode = 0):
          
          hThread = self.get_handle(win32.THREAD_TERMINATE)
          win32.TerminateThread(hThread, dwExitCode)
  
          # Ugliest hack ever, won't work if many pieces of code are injected.
          # Seriously, what was I thinking? Lame! :(
          if self.pInjectedMemory is not None:
              try:
                  self.get_process().free(self.pInjectedMemory)
                  self.pInjectedMemory = None
              except Exception:
  ##                raise           # XXX DEBUG
                  pass
docs: Terminates the thread execution.
  
          @note: If the C{lpInjectedMemory} member contains a valid pointer,
          the memory is freed.
  
          @type  dwExitCode: int
          @param dwExitCode: (Optional) Thread exit code.