Re: Why can't I run a WINXP service having an infinite while loop???

Tech-Archive recommends: Fix windows errors by optimizing your registry



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?



.



Relevant Pages

  • Re: Looping through output
    ... loop while a condition is true. ... I believe since a new header is being started after the XML ... trying to send the contents of that record to a client over and over ... request, ...
    (comp.lang.php)
  • Re: Looping through output
    ... loop while a condition is true. ... I believe since a new header is being started after the XML ... trying to send the contents of that record to a client over and over ... request, ...
    (comp.lang.php)
  • Re: Looping through output
    ... loop while a condition is true. ... I believe since a new header is being started after the XML ... trying to send the contents of that record to a client over and over ... request, ...
    (comp.lang.php)
  • Re: Looping through output
    ... loop while a condition is true. ... I believe since a new header is being started after the XML ... trying to send the contents of that record to a client over and over ... request, ...
    (comp.lang.php)
  • Re: Looping through output
    ... loop while a condition is true. ... I believe since a new header is being started after the XML ... Jerry Stuckle ... request, ...
    (comp.lang.php)