Link to home
Start Free TrialLog in
Avatar of geocoins-software
geocoins-software

asked on

Is there an internet connection

I would like to add code to my application to test whether there is an active internet connection or not.
My application does some internet related functionality and I want to be sure that there is a connection prior to executing this functionality.

I can find lots of routines...but which is the best method?
Avatar of JoWickerman
JoWickerman
Flag of South Africa image

HI,

Perform a ping to test connectivity.

ping microsoft.com

I used it once... Although it was in VB.

Hope this is useful.

Cheers,
Avatar of geocoins-software
geocoins-software

ASKER

How about some code on how to do it?
ASKER CERTIFIED SOLUTION
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well... VB code is:

My.Computer.Network.Ping("207.46.232.182")

Cheers
well, im not looking for VB code.....and since this is a Delphi zone......enough said.
I used InternetGetConnectedState - it works great - thanks!