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
Security Picture

Photos

Central Park 1
Show All
Me in MSDN Forums
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Contributed a proposed answer to the question Close some open windows by name in the Visual C# General forum
-   Replied to the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Replied to the question Close some open windows by name in the Visual C# General forum
-   Contributed a helpful post (total votes:2) to the forums thread Array of events? in the Visual C# General forum
-   Answered the question Displaying random images from resources in the project in the Visual C# Language forum
-   Contributed a helpful post (total votes:1) to the forums thread sorted dictionary (Can i get key from value) in the Visual C# General forum
-   Contributed a proposed answer to the question Non-existing Argument in format string in the Visual C# General forum
Entries
News
Articles