Proyecto

General

Perfil

Descargar (1,09 KB) Estadísticas
| Rama: | Revisión:
a2ba555f Elisa
program serveralumnolinex;

{$mode objfpc}{$H+}

uses
cthreads,
Classes, SysUtils, CustApp, globales, demonio,
IdCmdTCPServer, IdCommandHandlers,IdContext,
IdSync, IdCustomTCPServer,
IdTCPClient,clservidor, clcomandosroot;

type

{ TMyApplication }

TMyApplication = class(TCustomApplication)
private
f_usuario:String;
f_contador:integer;
protected
procedure DoRun; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
end;

{ TMyApplication }

procedure TMyApplication.DoRun;

begin
IF g_finalizar then terminate;
sleep(50);
end;

constructor TMyApplication.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
StopOnException:=True;
f_usuario:=GetEnvironmentVariable('USER');
f_contador:=0;
end;

destructor TMyApplication.Destroy;
begin
inherited Destroy;
end;

var
Application: TMyApplication;

{$IFDEF WINDOWS}{$R serveralumnolinex.rc}{$ENDIF}

begin
Application:=TMyApplication.Create(nil);
Application.Run;
Application.Free;
end.