Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I turn a regular Delphi application into a service for a Windows NT4 server?

0
Posted

How can I turn a regular Delphi application into a service for a Windows NT4 server?

0

The meaning for this is that the program should run when the server is rebooted and even when the server is not logged on. So putting the program in startup folder is not enough. Answer: With Delphi 5, this has become very simple. Just go to ‘File’ -> ‘New’ -> ‘Service Application’. It will create a regular project source with one main ‘form’, which is derived from TService. The TService class encapsulates a Windows NT service in an NT service application. A service is accessed via the Service Control Manager. It is usually started during boot time or manually in the control panel ‘Services’ applet. The code will look as shown in the example below and consult the online help about TService. You may want to handle the OnExecute event.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123