Called when a Stop Command message is sent to to the service. This function is expected to be overridden when the CanStop property is true.
[Visual Basic] Overridable Protected Sub OnStop() [C#] protected virtual void OnStop(); [C++] protected: virtual void OnStop(); [JScript] protected function OnStop();
ServiceBase Class | ServiceBase Members | System.ServiceProcess Namespace