Ir para conteúdo
Fórum Script Brasil
  • 0

.mdb saber quem esta logado


rebotea

Pergunta

3 respostass a esta questão

Posts Recomendados

  • 0

e isso ai amigo so que não funciona comigo. depois de compilar não retorna nenhum cliente .

ses ActiveX;

{$R *.DFM}

function LDBUser_GetUsers(var UserBuffer: PSafeArray; DatabaseName: PChar; Options: Integer): Integer;

stdcall; external 'MSLDBUSR.DLL';

function LDBUser_GetError(ErrorNo: Integer): PChar;

stdcall; external 'MSLDBUSR.DLL';

procedure TformMenuPrincipal.RadioGroupOptionsClick(Sender: TObject);

begin

bActualizarClick(Self);

end;

procedure TformMenuPrincipal.bActualizarClick(Sender: TObject);

var

numUsuarios : Integer;

UserBuffer : Variant;

opcionSel : Integer;

i : Integer;

begin

lsUsuarios.Items.Clear;

UserBuffer := VarArrayCreate([1, 1], varOleStr);

case RadioGroupOptions.ItemIndex of

0 : opcionSel := 1;

1 : opcionSel := 2;

2 : opcionSel := 4;

3 : opcionSel := 8;

else

opcionSel := 1;

end;

numUsuarios := LDBUser_GetUsers(PSafeArray(TVarData(UserBuffer).VArray), PChar(txtMDB.Text), opcionSel);

if numUsuarios < 0 then

MessageDlg(LDBUser_GetError(numUsuarios), mtError, [mbOK], 0)

else

begin

if opcionSel = 8 then

MessageDlg ('Nº de usuarios conectados: ' + IntToStr(numUsuarios), mtInformation, [mbok], 0)

else

begin

for i := 1 to numUsuarios do

begin

with lsUsuarios.Items.Add do

begin

Caption := IntToStr(i);

SubItems.Add(PChar(TVarData(UserBuffer).VPointer));

end;

end;

end;

end;

end;

procedure TformMenuPrincipal.ButtonInfoClick(Sender: TObject);

var

UserBuffer: PSafeArray;

begin

LDBUser_GetUsers(UserBuffer, '', $B0B);

end;

procedure TformMenuPrincipal.bSelMDBClick(Sender: TObject);

begin

with OpenDialog do

begin

FileName := txtMDB.Text;

if Execute then

begin

txtMDB.Text := FileName;

bActualizarClick(Self);

end;

end;

end;

procedure TformMenuPrincipal.FormCreate(Sender: TObject);

var

i : integer;

ruta : string;

begin

if ParamCount > 0 then

begin

ruta := '';

for i := 1 to ParamCount do

begin

if ruta = '' then

ruta := ruta + ParamStr(i)

else

ruta := ruta + ' ' + ParamStr(i);

end;

txtMDB.Text := ruta;

bActualizarClick(Self);

end;

end;

procedure TformMenuPrincipal.LWEBClick(Sender: TObject);

begin

ShellExecute(Handle, Nil, PChar('http://www.ajpdsoft.com'),

Nil, Nil, SW_SHOWNORMAL);

end;

procedure TformMenuPrincipal.bSalirClick(Sender: TObject);

begin

close;

end;

end.

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...