Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Close Remote Session
#6
(05-06-2021, 11:43 AM)Jose Nilton Pace Wrote: 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;

This code should not be used anymore (at least not in IW 15.1 and later). It simply won't complile.
Reply


Messages In This Thread
Close Remote Session - by Rolphy Reyes - 05-04-2021, 09:41 PM
RE: Close Remote Session - by DanBarclay - 05-05-2021, 03:40 AM
RE: Close Remote Session - by Rolphy Reyes - 05-05-2021, 01:43 PM
RE: Close Remote Session - by Alexandre Machado - 05-05-2021, 11:23 PM
RE: Close Remote Session - by Jose Nilton Pace - 05-06-2021, 11:43 AM
RE: Close Remote Session - by Alexandre Machado - 05-11-2021, 10:45 AM
RE: Close Remote Session - by Alexandre Machado - 05-11-2021, 10:45 AM
RE: Close Remote Session - by Rolphy Reyes - 05-11-2021, 03:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)