Türkçe   |   English
Calendar
Categories
Archive
Links
Blogroll
Files

Is your computer connected to Internet? - 13.11.2009

Most of the developers ping an internet address or a web site to check whether computer is connected to Internet or not. However there is a much simple and accurate way to achieve this goal which is using an api. I'm sharing the code that you can use in your applications.

        [DllImport("wininet.dll")]
        private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);
        public static bool IsInternetConnectionAvailable()
        {
            int d;
            return InternetGetConnectedState(out d, 0);
        }
Clues,Codes

22.11.2009 - Vamsi Krishna
Hi I found this piece of Code very interesting and helpfull, I am writing a blog post on this code.Hope you won't mind.I am adding a link to this page and giving you the entire credit.
http://coderbuddy.wordpress.com
Add Comment
First Name Last Name
Web Site
E-Mail
Comment




Photos

Downtown Seattle
Show All
Me in MSDN Forums
Entries
News
Articles