|
Determines if the last log-in session from same IP was terminated correctly or not. Returns 0 when terminated correctly. |
// After Login or after the server has been started
global
updating procedure OnApplicationStartupComplete()
begin
record TempBlock TMb;
record RcVc RepSpec;
Integer wn;
Integer pt;
if (CompileType!=ctWindowsCE and CompileType!=ctSeries80 and CompileType!=ctSeries60 and CompileType!=ctNokiaE90 and CompileType!=ctBPadCE and CompileType!=ctWindowsCELandscape) then begin
asyncremote.RegisterAtPresenceServer(CurrentUser,1,1);
end;
if (ServerMode or SingleUserMode) then begin
ExportPublicIPs;
if (LastSesTerminated!=0) then begin
SMSWhenNotProperlyTerminated;
end;
ResetRecordStatuses;
InitTXIdleTasks;//Server
InitIdleTasks;//Server
CheckDatabaseID;//Server
InitSysRunIdleTasks(0);//Server
end;
if (ClientMode or SingleUserMode) then begin
InitClientIdleTasks;//Client
end;
CallGetKeyFeature;
BlockLoad(TMb);
pt = GetProgramMode;
if (TMb.Deflag!=0 and IsBooks==false and pt!=typReports and pt!=typPOS and pt!=typStock and pt!=typSynchronizedPOS and pt!=typMobileRestaurant) then begin
wn = OpenWindow("DemoCompanyWClass",0,0,"","",RepSpec);
end;
return;
end;
|
««