wimvanherp
Programmer
Hallo,
i want to program a service under win2K so i made a little test to see how it works. It is a simple service that just beeps every x msec. It works allright to make and install the service, but as soon as it runs, it is impossible to stop the service. I have to reboot the computer to make it stop.
I just made a ServiceApplication and changed the following code to make it run
void __fastcall TService1::ServiceExecute(TService *Sender)
{ Start();
}
//---------------------------------------------------------------------------
int TService1::Start()
{ unsigned int delay=2000;
for(;
{ Beep();
ServiceThread->ProcessRequests(false);
Sleep(delay);
}
} // Start
When i changed to
rocessRequests(true) it didn't work either.
As you can see this is a very basic program, so can anybody tell me how i have to do this properly so that i will be able to stop the service ?
thanks
Wim Vanherp
i want to program a service under win2K so i made a little test to see how it works. It is a simple service that just beeps every x msec. It works allright to make and install the service, but as soon as it runs, it is impossible to stop the service. I have to reboot the computer to make it stop.
I just made a ServiceApplication and changed the following code to make it run
void __fastcall TService1::ServiceExecute(TService *Sender)
{ Start();
}
//---------------------------------------------------------------------------
int TService1::Start()
{ unsigned int delay=2000;
for(;
{ Beep();
ServiceThread->ProcessRequests(false);
Sleep(delay);
}
} // Start
When i changed to
As you can see this is a very basic program, so can anybody tell me how i have to do this properly so that i will be able to stop the service ?
thanks
Wim Vanherp