5,927
社区成员




program ProSysServer;
uses
SvcMgr,
Forms,
Windows,
SysUtils,
U_WinSysServer in 'U_WinSysServer.pas' {frmSysServer},
U_SvrControl in 'U_SvrControl.pas',
U_SysServer in 'U_SysServer.pas',
U_MsgDialogs in 'U_MsgDialogs.pas' {frmMsgDialogs},
U_TcpServer in 'U_TcpServer.pas' {frmTCPServer},
U_Global in 'U_Global.pas';
{$R *.res}
begin
if not SysServerInstalling then
begin
CreateMutex(nil, True,PChar(SysServerMutexID));
if GetLastError = ERROR_ALREADY_EXISTS then
begin
MessageBox(0, PChar(AlreadyRunning), PChar(SysServerDisplayName), MB_ICONERROR);
Halt;
end;
end;
if SysServeInstalling or SysServerStartService then
begin
SvcMgr.Application.Initialize;
UserSysService := TUserSysService.CreateNew(SvcMgr.Application, 0);
SvcMgr.Application.CreateForm(TfrmSysServer, frmSysServer);
SvcMgr.Application.Run;
end else
begin
Forms.Application.ShowMainForm := False;
Forms.Application.Initialize;
Forms.Application.CreateForm(TfrmSysServer, frmSysServer);
Forms.Application.CreateForm(TfrmTCPServer, frmTCPServer);
frmSysServer.Initialize(False);
Forms.Application.Run;
end;
end.