An easy way is to just put all of your code in DataModules or just normal 
classes. Have an interface that has the basics: start, stop, etc. Then you can 
create a Forms app and drop a few buttons on it to link to the interface. For 
the service, just create a new project and link the service events to you 
DataMods. I always do this for services, I debug them as an app then I compile 
them as a service. Since there is no logic in the Form, everything should work 
the same.


 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francois PIETTE
Sent: Friday, November 04, 2005 12:14 PM
To: [email protected]
Subject: Run as "normal" AND as "NT Service Application"

> Does anyone know how to set up an application that can run either as a
> normal application (shows a window and operates fully) but can also run as 
> a
> Service Application (no form required).

 What you ask is a "dual mode service".
Have a look at this source code: http://www.2p.cz/en/download.html the file 
is windows_nt_service_dual_interface.zip ate the bottom of the Delphi 
section. You'll need a number of other files on the page to compile it.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

> ----------
> De : Brian [SMTP:[EMAIL PROTECTED]
> Répondre à : Delphi-Talk Discussion List
> Date : vendredi 4 novembre 2005 1:58
> A : [email protected]
> Objet : Run as "normal" AND as "NT Service Application"
> Sorry if this has been discussed before - new to the list.
> Does anyone know how to set up an application that can run either as a
> normal application (shows a window and operates fully) but can also run as 
> a
> Service Application (no form required).
> Normal operation would be as a service but would be "very" useful to debug
> as a normal app (form showing progress/status, etc)
> PS I have seen an application/service that runs this way (and I know it 
> was
> written in Delphi) - would be great to be able to replicate the
> functionality.
> __________________________________________________
> Delphi-Talk mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi-talk 

__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to