<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Yeah :)<br>
<br>
<br>
My code isn't using the onExecute I am actually starting and stopping
my own Tthread on the onStart event. However The actual (current)
problem I am having is that even with no code whatsoever I cant
register my service (which I need to do at some point and apparently
need for debugging).<br>
<br>
Cheers<br>
<div class="moz-signature">
<div class="Section1"><span style="" lang="EN-NZ"><o:p></o:p></span><span
style="color: rgb(255, 153, 0);" lang="EN-NZ"><o:p></o:p></span>
<p class="MsoNormal"><span style="" lang="EN-NZ"><o:p><br>
</o:p></span></p>
</div>
</div>
<br>
<br>
Dave O'Brien wrote:
<blockquote
cite="mid:B7B55593E7459A4781B761838D99059C08D9E0@tsl-web.ICCS.CO.NZ"
type="cite">
<pre wrap="">Something like this?
var
Stopped: Boolean = false ;
procedure TsvcSomeService.ServiceExecute(Sender: TService);
var
t: TDateTime ;
begin
try
t := now - 720 ;
While (not terminated) and (not stopped) do
begin
if now > t + (1/1440) then // Run once a minute
begin
// Do something
t := now ;
End ;
Sleep(1000) ; // Sleep to allow other services time...
end ;
except
end ;
end;
procedure TsvcSomeService.ServiceStart(Sender: TService;
var Started: Boolean);
begin
Started := True ;
Stopped := False ;
end;
procedure TsvcSomeService.ServiceStop(Sender: TService;
var Stopped: Boolean);
begin
Stopped := True ;
end;
procedure TsvcSomeService.ServiceCreate(Sender: TObject);
begin
// Create some stuff
end;
procedure TsvcSomeService.ServiceShutdown(Sender: TService);
begin
Stopped := True ;
end;
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a> [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@delphi.org.nz">mailto:delphi-bounces@delphi.org.nz</a>]
On Behalf Of Robert martin
Sent: Friday, 9 October 2009 10:34 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] basic Service question
Hi
I am trying to create a service 9never done this before) and following
some old instructions I found on the web. The suggest creating a
service then installing it with service.exe /install then adding code
and debuggin. I am failing at the most basic point. I am trying to
install on Vista from cmd line. It just comes up with a 'program is not
responding message.
Any help would be appreciated :)
Rob
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject:
unsubscribe
No virus found in this incoming message.
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 8.5.421 / Virus Database: 270.14.7/2422 - Release Date:
10/08/09 06:39:00
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe
</pre>
</blockquote>
</body>
</html>