Forum > General

Daemon realization on Windows

<< < (3/3)

paweld:
DemonMapper content in my projects is something like this:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---unit SrvMapperU; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, DaemonApp, LazUTF8; type   { TTestServiceMapper }   TTestServiceMapper = class(TDaemonMapper)  published    constructor Create(AOwner: TComponent); override;  end; const  SrvName = 'TestService'; var  TestServiceMapper: TTestServiceMapper; implementation procedure RegisterMapper;begin  RegisterDaemonMapper(TTestServiceMapper)end; {$R *.lfm} { TTestServiceMapper } constructor TTestServiceMapper.Create(AOwner: TComponent);var  ddef: TDaemonDef;begin  inherited Create(AOwner);  ddef := Self.DaemonDefs.Add as TDaemonDef;  ddef.DaemonClassName := 'TTestService';  ddef.Name := SrvName;  ddef.DisplayName := UTF8ToWinCP('Usługa "Test"');  ddef.Description := UTF8ToWinCP('Usługa sys]"]>Blockedwa o nazwie Test, łążĆŃÓĘŁĄłąą ');  ddef.Options := [doAllowStop];  ddef.WinBindings.StartType := stBoot;  ddef.WinBindings.WaitHint := 0;  ddef.WinBindings.IDTag := 0;  ddef.WinBindings.ServiceType := stWin32;  ddef.WinBindings.ErrorSeverity := esIgnore;  ddef.LogStatusReport := False;end;  initialization  RegisterMapper;end.  content is displayed correctly in the list of services

Molochnik:
paweld
Thank you very much! That totally resolved my problem :)

Navigation

[0] Message Index

[*] Previous page

Go to full version