1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| procedure ListeLesUtilisateurs (var I1 : integer);
var
TmpCursor: hDbiCur;
rslt: dbiResult;
UsrDesc: USERDesc;
begin
i1 := 0 ;
if SlUtilisateurs.Count = 0 then
begin
Check(DbiOpenUserList(TmpCursor)) ;
repeat
rslt:= DbiGetNextRecord(TmpCursor, dbiNOLOCK, @UsrDesc, nil) ;
if (rslt <> DBIERR_EOF) then begin
SlUtilisateurs.Add(UsrDesc.szUserName+
'- NS : ' + IntToStr(UsrDesc.iNetSession)+
'- PC : ' + IntToStr (UsrDesc.iProductClass));
if UsrDesc.iNetSession > i1 then
I1 := UsrDesc.iNetSession ;
end;
until (rslt <> DBIERR_NONE);
check(DbiCloseCursor(TmpCursor));
end ;
end; |
Partager