Windows Service Project

Another deployment method for production environments is Windows Servicearrow-up-right. It creates a standard Delphi Windows Service project with a few modifications to allow creating a uniGUI ServiceModulearrow-up-right. Service projects generate standard Windows Service executables which can be installed like any regular Windows Service. A Windows Service is automatically started by Windows and it is always available as long as Windows is running. This provides a high level of availability for the uniGUI application. Also, see Deployment Optionsarrow-up-right.

Project1.dpr
program Project1;

uses
  SvcMgr,
  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},
  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},
  Main in 'Main.pas' {MainForm: TUniForm},
  ServiceModule in 'ServiceModule.pas' {UniServiceModule: TUniGUIService};

{$R *.res}

begin
  if not Application.DelayInitialize or Application.Installing then
    Application.Initialize;
  Application.CreateForm(TUniServiceModule, UniServiceModule);
  Application.Run;
end.