I have a windows service S1 with dependency X. The service is automatic and it starts without any problems.
This service starts another service S2 with same dependency X. The problem is that when I call StartService() to start S2, I don't return from the function for about a minute, and only than I start the entrance code of S2.
I am trying to understand why it takes so long to start the service, but I'm really out of ideas :-( .
Does anyone have any ideas ???
Tha开发者_如何学Gonks!
When do you start the other service S2? You cannot call StartService() until your service has reported a successful start. Is S2 a dependency of S1? If so, just mark it as such and let SCM worry about it.
精彩评论