I just had a quick crack at it, and all worked fine for me -- I'll send you
my code privately.
Cheers,
Kerry "Darwinternetter" S
----- Original Message -----
From: David O'Brien <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, November 10, 1999 9:14 AM
Subject: RE: [DUG]: Service Application not Stopping
> OK... I seem to have struck a blank here. Thanks to Peter for his reply,
but
> I am obviously missing the point with NT services.
>
> Can anyone send me an example of a simple service that can start and stop?
>
> Its either poorly written help, misunderstood terminology or a lack of
> alcohol that makes me totally unable to see the answer here.
>
> Cheers,
> Dave.
>
> -----Original Message-----
> From: David O'Brien [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 8 November 1999 13:20
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Service Application not Stopping
>
>
> I went File|New|Service Application. This produced a TService in which I
> have put the code in the OnExecute Event. There is no ProcessRequests in a
> TService. Do I have to create a TServiceThread? If so, what is a TService
> for?
>
> What I am trying to achieve is a service that polls a folder looking for
> certain types of files, and processing them. This is basically a loop with
a
> sleep(1000).
>
> Dave.
>
> -----Original Message-----
> From: Peter G Jones [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 9 November 1999 01:16
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: Service Application not Stopping
>
>
> What's in the your on Execute event? Are you calling the
> ServiceThreads.ProcessRequests?
>
>
> >From: David O'Brien <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> >Subject: [DUG]: Service Application not Stopping
> >Date: Mon, 8 Nov 1999 11:20:32 +1300
> >
> >I have created a service apllication in D5Pro, and can install and start
> >the
> >service happily in NT4 SP5. However, I cannot stop the service. The D5
Help
> >is no help to me here.
> >
> >Where do you put code to terminate the service when the service is
stopped
> >from the services manager? (and what is the code?)
> >
> >I have a loop in the OnExecute event which has a boolean global variable
> >controlling it. The help says when the Execute code finishes the service
> >will stop. So in the OnStop event I set the Boolean false, and say
Stopped
> >:= True.
> >
> >What am I missing. (First time with services).
> >
> >Thanks in advance,
> >David O'Brien.
>
>---------------------------------------------------------------------------
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz