Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Nov : I have a problem using a dependency in a TService

www.cryer.info
Managed Newsgroup Archive

I have a problem using a dependency in a TService

Subject:I have a problem using a dependency in a TService
Posted by:"Gee" (g..@somewhere.com)
Date:Wed, 16 Nov 2005 17:16:31 +1000

Using D6 I have a TServer which depends on SQL Server. So I have set the
Depends name to MSSQLSERVER and it correctly works and when I stop SQL it
stops my service. However if SQL doesn't start when the computer starts up
my service causes the computer to reboot when the user tries to logon. If I
go into the recovery console I can diaable my service and get back onto the
PC but its not very friendly to say the least. I thought it might be some
code in the service so I removed all the code so the excute does a loop
like:

while not Terminated do begin
      ServiceThread.ProcessRequests(False);
      Sleep(10);
   end;

I then (using a VMware) set my service to autostart and set MSQLSERVER to
disabled and it will continually reboot. I have looked through the VCL and
can't see anything much in there that controls the dependencies. Anyone know
how to prevent this problem?

Info

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive