Ido Samuelson

Notes, thoughts and exceptions

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Blogs I read

Articles

My WorkSpaces

Subscriptions

News

Only 10 kind of people in the world. Those who understand binary and those who don't.

Post Categories

Article Categories



Checking Internet Connection

This is a nice and clean code to check if your smart client is connected to the internet (this is the same code IE is using) :
 
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int connectionDescription, int reservedValue);
 
public bool IsConnected()
{
    int connectionDescription = 0;
    return InternetGetConnectedState(out connectionDescription, 0);
}

 
UPDATE:
This is not my code, I saw it on Smart Client Architecture documentation
 

posted on Sunday, July 11, 2004 1:12 PM by snick





Powered by Dot Net Junkies, by Telligent Systems