As usual the first step is a project creation. SvCom components
requires the NT Service Application be used as a base of project. To
create it go to the File|New dialog and select the SvCom page
Select the "NT Service Application" item from the list
and press OK. The new project will be created. Save it as SvComExample1.dpr.
Note that the "uses" section of the project created does
not contain Forms unit. The SvCom_NTService unit is used instead.
This unit contains the Application variable that is used
in the same manner but performs some specific actions necessary to implement
the service behavior.
|
begin
Application.Initialize;
Application.Run;
end.
|
In future be aware that the Form unit is not included
into the "uses" section of project file or at least the SvCom_NTService
unit goes after it. Only in this case the Delphi compiler will use the
Application variable from the SvCom_NTService unit, not from the Forms
unit.