def Finish(self): """ Overrides eg.ThreadWorker.Finish to destroy the window instance. """ if not DestroyWindow(self.hwnd): raise WinError() self.hwnd = None
def Finish(self): """ This will be called inside the thread when it finishes. It will even be called if the thread exits through an exception. """ self.abort = True self.lock.acquire() if self.dll: self.dll.IR_Close(self.hwnd, 0) #print "Irremote is stopped" if self.timerInit: self.timerInit.cancel() #print "Init aborted" if self.hwnd: windll.user32.KillTimer(self.hwnd, 1) DestroyWindow(self.hwnd) UnregisterClass(self.wc.lpszClassName, self.hinst) if self.defaultPollTime != -1: regHandle = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\hauppauge\IR', 0, _winreg.KEY_WRITE | _winreg.KEY_READ) _winreg.SetValueEx(regHandle, 'PollRate', 0, _winreg.REG_DWORD, int(self.defaultPollTime)) _winreg.CloseKey(regHandle) self.lock.release()
def Finish(self): """ This will be called inside the thread when it finishes. It will even be called if the thread exits through an exception. """ self.dll.MceIrUnregisterEvents() DestroyWindow(self.hwnd) UnregisterClass(self.wc.lpszClassName, self.hinst) self.Stop() # is this needed?
def Finish(self): if not RemoveProp(self.hWnd, self.wndClass.lpszClassName): raise WinError() if not DestroyWindow(self.hWnd): raise WinError() if not ( UnregisterClass( self.wndClass.lpszClassName, self.wndClass.hInstance ) ): raise WinError()