Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
On Line?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00580434
Message ID:
00580452
Views:
25
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform