unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs,
Inifiles;
type
Tmvideo_sync =
class(TService)
procedure ServiceExecute(Sender: TService);
procedure ServiceStart(Sender: TService;
var Started: Boolean);
procedure ServiceStop(Sender: TService;
var Stopped: Boolean);
procedure ServiceAfterUninstall(Sender: TService);
procedure ServiceBeforeUninstall(Sender: TService);
procedure ServiceAfterInstall(Sender: TService);
private
{ Private-Deklarationen }
public
testi :
string;
function GetServiceController: TServiceController;
override;
{ Public-Deklarationen }
end;
var
mvideo_sync: Tmvideo_sync;
implementation
{$R *.DFM}
procedure ServiceController(CtrlCode: DWord);
stdcall;
begin
mvideo_sync.Controller(CtrlCode);
end;
function Tmvideo_sync.GetServiceController: TServiceController;
begin
Result := ServiceController;
end;
procedure Tmvideo_sync.ServiceExecute(Sender: TService);
var
h, m, s, ms : Word;
begin
while not terminated
do begin
//ServiceThread.ProcessRequests(false);
end;
end;
procedure Tmvideo_sync.ServiceStart(Sender: TService;
var Started: Boolean);
begin
testi := '
gesetzt';
Started := true;
end;
procedure Tmvideo_sync.ServiceStop(Sender: TService;
var Stopped: Boolean);
begin
showmessage(testi);
end;
procedure Tmvideo_sync.ServiceAfterUninstall(Sender: TService);
begin
showmessage(testi);
end;
procedure Tmvideo_sync.ServiceBeforeUninstall(Sender: TService);
begin
showmessage(testi);
end;
procedure Tmvideo_sync.ServiceAfterInstall(Sender: TService);
begin
showmessage(testi);
end;
end.