Re: Why can't I run a WINXP service having an infinite while loop???
- From: "Tom Serface" <tserface@xxxxxxx>
- Date: Fri, 8 Dec 2006 06:30:33 -0800
I'm no expert on doing services, but I think you need to respond (usually in
another thread that just handles this) to the OS while you are starting up
or stopping or pausing (I.E., changing state). So if someone requests to
stop your service (including the OS) perhaps you are in too tight of a loop
to know you got that request? This might be useful for you.
http://www.naughter.com/serv.html
Tom
"azsx" <radu_plugaru@xxxxxxxxx> wrote in message
news:1165577163.779721.122710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can you help me with this problem: I create a service, but when I try
to run it - at first everything lookes OK and after some time I get
Error 1053: The service did not respond to the start or control request
in a timely fashion... I think this is because I have an infinite while
loop in my service code. I also use
for(int i=0;i<90;i++)
Sleep(1000*20)
as I heard that this error can appear to an inncativity of 30
seconds...
Can you give some ideas for overcomming this?
.
- References:
- Prev by Date: Re: Cleaning Up After OnCloseDocument()
- Next by Date: Re: Something like "ping" for windows messages.
- Previous by thread: Why can't I run a WINXP service having an infinite while loop???
- Next by thread: Re: Why can't I run a WINXP service having an infinite while loop???
- Index(es):
Relevant Pages
|