Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On Line?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00580434
Message ID:
00580452
Vues:
27
Hi!

>How do I know programately if I'm connected to the Internet. Any Ocx?
#define INTERNET_CONNECTION_MODEM           1
#define INTERNET_CONNECTION_LAN             2
#define INTERNET_CONNECTION_PROXY           4
#define INTERNET_CONNECTION_MODEM_BUSY      8

Declare Integer InternetGetConnectedState in Wininet.dll Long @dwFlags, Long Reserved

Flags = 0
Msg = ""
If InternetGetConnectedState(@Flags, 0) != 0
	Do Case
	Case BitAnd(Flags, INTERNET_CONNECTION_MODEM) > 0
		Msg = "Connection via modem"
	Case BitAnd(Flags, INTERNET_CONNECTION_LAN) > 0
		Msg = "Connection via LAN"
	EndCase
Else
	Msg = "Not connected"
EndIf
MessageBox(msg)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform