Verificar Conexion con Internet

Verificar Conexion con Internet

Postby leandro » Tue Dec 05, 2006 9:17 pm

Amigos del foro, tengan buena tarde...

¿Existe alguna forma de saber si el pc esta conectado a internet?, y si se puede me podrian pasar un ejemplo.
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1682
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Postby Antonio Linares » Tue Dec 05, 2006 9:52 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42150
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby R.F. » Tue Dec 05, 2006 10:24 pm

Una forma de hacerlo sin matar pulgas a cañonazos:

Function IsInternet()
WSAStartup()
RETURN (IIF(GetHostByName("microsoft.com")<>"0.0.0.0",.T.,.F.)
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby jcaro » Wed Dec 06, 2006 1:03 pm

Leandro:

Esta es la que yo utilizo:

Function IsInternet()

LOCAL cIp, cVret := .F.

WsaStartUp()

cIp := GETHOSTBYNAME("microsoft.com")

WsaCleanUp()

RETURN (cIp<>"0.0.0.0")
Juan
==> Pasando a FWH16.04 + Harbour32 + BCC70 + PellesC
=> Abandonando FWH 13.7 + xHarbour + BCC582
http://www.mitaller.cl
jcaro
 
Posts: 270
Joined: Fri Nov 11, 2005 7:39 pm

Gracias a todos

Postby leandro » Thu Dec 07, 2006 11:24 pm

Muchas gracias a todos funciono de maravilla. :D
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1682
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 104 guests