
December 12th, 2002, 08:23 AM
|
|
Junior Member
|
|
Join Date: Dec 2002
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Stopping a windows servicce
I have a windows service named 'TestService'. This service is done using VB.NET. It implements a timer which has some code in it.
I want to stop the service from a code within the service itself. I am overriding the OnStop() , but what i am trying to achieve is that anytime an error occours in my timer code, i want to stop the service ,not only disable the timer which i am doing right now, but also the status in the Service Control Manager in the control panel for services, should display the service status as Stopped.
Please help me with this as soon as possible. Thank you guys.
|