Software Development Network>> Visual C#>> check if there is internect connection ?
How can I check if there is internet connection
thanks
Use P/Invoke to call WinAPI InternetGetConnectedState method
See sample there http://www.aspemporium.com/howto.aspx hid=27
There are more than one way to get connection state
The First is to use P/invoke and calling WinAPI InternetGetConnectedState this one that Michael Nemtsev provide to you
The Seconed .Net 2 have NetworkChange class it hase two events NetworkAvailabilityChanged and NetworkAddressChanged
for an example of this method look at
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=118246&SiteID=1
The Third to use System management objects for an example of this method look at
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=559421&SiteID=1
check if there is internect connection ?
Boris Gingberg
Use P/Invoke to call WinAPI InternetGetConnectedState method
See sample there http://www.aspemporium.com/howto.aspx hid=27
Keith Seifert
There are more than one way to get connection state
The First is to use P/invoke and calling WinAPI InternetGetConnectedState this one that Michael Nemtsev provide to you
The Seconed .Net 2 have NetworkChange class it hase two events NetworkAvailabilityChanged and NetworkAddressChanged
for an example of this method look at
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=118246&SiteID=1
The Third to use System management objects for an example of this method look at
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=559421&SiteID=1