Important note: The source code of this example is included into SvCom package. The latest version of this example is available here: Simple NT Service Example.
Go to the Delphi's Object Inspector and set the NTService
module properties. Set the "Name" property to the 'SampleService1' and
"DisplayName" to the 'SvCom Example N 1'. In future you will see the
DisplayName on the Services Control Panel applet. The Name property value can
be used to control the service from the command line.

The previous and the current steps affect the
project source. Look at it. You will see that the "uses" section`s changed,
namely the new unit`s added to it. The project execution part is changed too.
The added text is marked by background color below. This line is added
automatically and looks exactly as in ordinary Delphi project.
|
begin
Application.Initialize;
Application.CreateForm(TSampleService1,SampleService1);
Application.Run;
end.
|
|