Board index » cppbuilder » How to check for internet connection via LAN

How to check for internet connection via LAN


2005-11-01 11:39:34 PM
cppbuilder77
Is there an easy way to check if there is an internet connection via LAN?
I want to check whether I can connect to a certain URL using a LAN
connection, and if this is not the case, connect using a dial-up connection.
Which API calls can I use?
 
 

Re:How to check for internet connection via LAN

"Martin Nijhoff" < XXXX@XXXXX.COM >wrote in message
Quote
Is there an easy way to check if there is an internet
connection via LAN?
No. That is one of the harder types of connections to detect since an
external computer is managing the actual connection.
Quote
I want to check whether I can connect to a certain URL
using a LAN connection
Then just conect to the URL and see if it fails.
Quote
and if this is not the case, connect using a dial-up connection.
Why don't you let the user decide what kind of connection to use?
Gambit
 

Re:How to check for internet connection via LAN

look at the following on MSDN.
InternetGetConnectedState
InternetCheckConnection
InternetAttemptConnect
InternetOpen
InternetOpenUrl
etc etc.
"Martin Nijhoff" < XXXX@XXXXX.COM >wrote in message
Quote
Is there an easy way to check if there is an internet connection via LAN?

I want to check whether I can connect to a certain URL using a LAN
connection, and if this is not the case, connect using a dial-up
connection.

Which API calls can I use?


 

{smallsort}

Re:How to check for internet connection via LAN

"Richard Bradbrook" < XXXX@XXXXX.COM >wrote in message
Quote
look at the following on MSDN.
Just keep in mind that the first three functions in that list are not
reliable.
Gambit