Our Sample in Detail (3 of 8)
We respond to an NT ServiceStop request by telling NT we are stopping, and setting a Windows Event
def SvcStop(self): # Before we do anything, tell the # SCM we are starting the stop process. self.ReportServiceStatus( \ win32service.SERVICE_STOP_PENDING) # And set my event. win32event.SetEvent(self.hWaitStop)