A
Andreas
Hi everybody,
Can anyone advise on how to restart service application from the application
itself? I've tried lunching second instance of the same application (as
normal application, not a service) with predefined parameter, which has to
open SCM, stop the service, start it and then exit, but apparently SCM
detects that another instance of the application is already running and
tries to use it directly. As a result StartService returns
ERROR_SERVICE_REQUEST_TIMEOUT which I presume happens because its main
thread is already blocked with the call to StartService. Will doing this
from the separate thread help? Won't there be any other restrictions? Has
anyone tried this and can possibly give some directions?
Thanks in advance,
Andreas
Can anyone advise on how to restart service application from the application
itself? I've tried lunching second instance of the same application (as
normal application, not a service) with predefined parameter, which has to
open SCM, stop the service, start it and then exit, but apparently SCM
detects that another instance of the application is already running and
tries to use it directly. As a result StartService returns
ERROR_SERVICE_REQUEST_TIMEOUT which I presume happens because its main
thread is already blocked with the call to StartService. Will doing this
from the separate thread help? Won't there be any other restrictions? Has
anyone tried this and can possibly give some directions?
Thanks in advance,
Andreas