Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Internet Connection
Message
From
12/08/2002 14:42:14
 
 
To
12/08/2002 14:31:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00688602
Message ID:
00688774
Views:
30
I got the general idea from the UT sometime last year, but I don't remember from whom...I know Ed R. was involved in the thread.

>Thanks for the example Steve. I was pinging an ip address, piping the results to a text file, and then using filetostr to parse it and look for 'unknown host.' It works, but I like your solution better.
>
>Tracy
>
>>Jos,
>>
>>Here is an example:
>>
>>
>>procedure checkInternetConnection
>>
>>	local lcWebAddress
>>	lcWebAddress = "http://mail.airmail.net"  && change this to a web address located close
>>							&& to you
>>
>>	* lcWebAddress = "http://206.66.12.86"    && or you can hard code the IP address
>>	                                              && of a web server
>>
>>	Declare Integer InternetCheckConnection in Wininet.dll String Url, Long dwFlags, Long Reserved
>>
>>	If InternetCheckConnection(lcWebAddress, 1, 0) != 0
>>		return .t.
>>	Else
>>		return .f.
>>	EndIf
>>
>>endproc
>>
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform