Buscar

Tipo de conexão

Código

Uses WinInet;


Function TipoConexao:boolean;
var
  flags: dword;
begin
  Result := InternetGetConnectedState(@flags, 0);
  if Result then begin
  showmessage('Conexão a Internet está Ativa');
  if (flags and INTERNET_CONNECTION_MODEM) = INTERNET_CONNECTION_MODEM then
  showmessage('Conexão por modem');
  if (flags and INTERNET_CONNECTION_LAN) = INTERNET_CONNECTION_LAN then
  showmessage('Conexião por lan');
  if (flags and INTERNET_CONNECTION_PROXY) = INTERNET_CONNECTION_PROXY then
  showmessage('Conexião por proxy');
  if (flags and INTERNET_CONNECTION_MODEM_BUSY) =INTERNET_CONNECTION_MODEM_BUSY then
  showmessage('modem ocupado');
  end;
end;
 
procedure TForm1.Button1Click(Sender: TObject);
begin
  TipoConexao;
end;

Publicidade

Vote na dica




Quantidade de votos: 0 votos
Aceitação: 0%


Detalhes da dica

Categoria: Rede
Adicionada dia: 24/06/03
Por: Felipe Monteiro
Visualizada: 3239 vezes

Planeta Delphi - Tudo sobre programação Delphi Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009