05-06-2021, 11:43 AM
Hi, try this code:
Code:
procedure TFrmSesionUsuario.CerrarSesion(const AAppId: string);
var
lApp: TIWApplication;
I: Integer;
xList: TList;
foundit : boolean;
begin
foundit := false;
xList := GSessions.LockList(False);
try
for i := 0 to xList.Count - 1 do
begin
lApp := TIWApplication(xList[i]);
if lApp.AppID = AAppId then
begin
foundit := true;
break;
end;
end;
finally
GSessions.UnLockList(xList);
if (foundit = true) then
begin
lApp.Terminate;
end;
end;
end;
