> I just wanted to know if the stop method of a windows service is called in
> any situation.(i.e. OS crashes or the windows service crashes) It's not
> practical to expect the stop event to be called when power goes off/machine
> is on fire atleast will it be called for S/W crash.
The Stop method is usually only called when the Service Control Manager
asks the service to .. well .. stop.
If you want the same routine called if the program fails then you have
to add error handling code to /make/ this happen - and that's /assuming/
you actually get the chance to do this; some failures are so bad the
process just vanishes.
If the O/S bites the dust, you won't have much chance to do anything!
HTH,
Phill W.