Board index » delphi » Number and Names of Users Logged Into Network.

Number and Names of Users Logged Into Network.

Can someone please assist us with determining the numbers and names of
users logged into a Delphi application at any time?

Paradox performs that function with 'ENUMUSERNAMES'. Is there a Delphi
equivalent or workaround?

Thanks in advance,
CAPS Central

 

Re:Number and Names of Users Logged Into Network.


You could check to see who is using the net file

Procedure TForm2.GetNetFileUsers(AList: TListBox);
    Var
      UserCur  : hDBICur;
      pUserDes : pUserDesc;
    Begin
      Check(DBIOpenUserList(UserCur));
      GetMem(pUserDes, sizeof(UserDesc));
      try
        FillChar(pUserDes^, sizeof(UserDesc), #0);
        while (DbiGetNextRecord(UserCur, DBILockType(0), pUserDes, nil) =
DBIERR_NONE) do
          AList.Items.Add('UserName : ' + StrPas(pUserDes^.szUserName));
      finally
        FreeMem(pUserDes, sizeof(UserDesc));
        DBICloseCursor(UserCur);
      End;
    End;

CAPS Central <produ...@capscentral.com> wrote in article
<35451125.DD3D0...@capscentral.com>...

Quote
> Can someone please assist us with determining the numbers and names of
> users logged into a Delphi application at any time?

> Paradox performs that function with 'ENUMUSERNAMES'. Is there a Delphi
> equivalent or workaround?

> Thanks in advance,
> CAPS Central

Other Threads