General information
Category:
Windows API functions
Title:
Test Internet connection
Hi,
Anyone know a *quick* way of checking for an Internet connection within a VFP app?
I've been using the API InternetOpen() followed by InternetOpenUrl()
If there is no problem then this is very fast.
If a connection is disabled then InternetOpen() fails instantaneously (well almost)
But if there are other problems (eg invalid gateway or router info) then InternetOpenUrl() can take a minute ot so to fail.
For my purposes I'd be quite happy to give up if a valid connection wasn't obtained in, say, 5 seconds.
I've tried InternetGetConnectedState() and InternetCheckConnection() but they may both result in a 'false positive'
Any other suggestions (has to work for all OSs post Win95....)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only