Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New version 15.1.0 is now available
#5
(07-15-2019, 08:53 AM)Alexandre Machado Wrote: It has been tested in all C++ Builder versions.
LockList() and UnLockList() don't exist anymore. I'm about to publish a new demo showing how to deal with this.

If you are using these functions how were you able to build your application?
My function in ServerController:

procedure TIWServerController.KillDoubleSession(UsernameConfusedtring);
var LSessions : TList;
    LSession : TIWApplication;
    i:Integer;
    cAppIDConfusedtring;
begin
  cAppID:='';
  LSessions := GSessions.LockList;
  try
    for i := 0 to Pred(LSessions.Count) do
    begin
      LSession := LSessions[i];
      LSession.Lock;
      try
        if (LSession.Data as TIWUserSession).WebUser.Username  = Username then
        begin
          cAppID:= LSession.AppID;
          break;
        end;
      finally
        LSession.Unlock;
        LSession := nil;
      end;
    end;
  finally
    GSessions.UnLockList(LSessions);
  end;

  if cAppID <>'' then
  begin
      GSessions.Terminate(cAppID);
  end;

end;

How now by new?
Reply


Messages In This Thread
RE: New version 15.1.0 is now available - by matija - 07-15-2019, 09:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)