Solved

Is there an internet connection

Posted on 2008-10-03
6
162 Views
Last Modified: 2012-05-05
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?
0
Comment
Question by:geocoins-software
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:JoWickerman
ID: 22634039
HI,

Perform a ping to test connectivity.

ping microsoft.com

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

Hope this is useful.

Cheers,
0
 

Author Comment

by:geocoins-software
ID: 22634075
How about some code on how to do it?
0
 
LVL 21

Accepted Solution

by:
ziolko earned 250 total points
ID: 22634187
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:JoWickerman
ID: 22634231
Well... VB code is:

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

Cheers
0
 

Author Comment

by:geocoins-software
ID: 22634248
well, im not looking for VB code.....and since this is a Delphi zone......enough said.
0
 

Author Closing Comment

by:geocoins-software
ID: 31502761
I used InternetGetConnectedState - it works great - thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month4 days, 11 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question