ServiceController.Refresh(); problems with service and servicecontroller
Posted on 2005-04-18
I am using a service controller to start,stop and pause my service. now when i start my service(canpauseandcontinue set to true) i check whether the service is pausable and according enable or disable my pause unpause button. but now the problem is after calling servicecontroller.start() the servicecontroller.status wont update. i tried using servicecontroller.refresh() but still the status wont refresh. but now the funnier part is when i debug, after calling refresh the status is updated. so i m pretty much confused.
also in my service i have set the canpauseandcontinue true, when i try to override the onPause() and onContinue method i get an error that cannot find a suitable onPause and onContinue methods.