Search This Blog

Thursday, January 3, 2013

How to check whether internet connection is available?

Some times we need to check the internet connection before doing updates or online license check.

How to find  it? Use the following code.



#include "intshcut.h"
#pragma comment(lib,"url.lib")

if( !InetIsOffline( 0 ))
{
    // Internet Connection is available  
}

No comments:

Post a Comment