Código Delphi
[-]
function GetUsers():Integer;
var
UserList: TStringlist;
TmpCursor: hDbiCur;
rslt: dbiResult;
UsrDesc: USERDesc;
begin
Result:=0;
Check(DbiOpenUserList(TmpCursor));
UserList := TStringList.Create;
try
UserList.Clear;
repeat
Rslt:= DbiGetNextRecord(TmpCursor, dbiNOLOCK, @UsrDesc, nil);
if Rslt <> DBIERR_EOF then
UserList.Add(UsrDesc.szUserName);
until Rslt <> DBIERR_NONE;
Result := UserList.Count;
finally
Check(DbiCloseCursor(TmpCursor));
FreeAndNil(UserList);
end;
end;
Cita:
|
Empezado por ayuda delphi
function DbiOpenUserList (var hUsers: hDBICur): DBIResult stdcall;
Description
DbiOpenUserList creates a table containing a list of users sharing the same network file.
Parameters
phUsers Type: phDBICur (Output)
Pointer to the cursor handle.
Usage
DbiOpenUserList is supported for Paradox only.
|
Si usan el mismo .NET se supone que usan el mismo alias.
Un saludo