using System ;
using System.Runtime ;
using System.Runtime.InteropServices ;
public class InternetConnectionChecker
{
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( int out description, int reservedValue ) ;
public static bool IsMachineConnectedToInternet( )
{
int desc ;
return InternetGetConnectedState( out desc, 0 ) ;
}
}
using System.Runtime ;
using System.Runtime.InteropServices ;
public class InternetConnectionChecker
{
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( int out description, int reservedValue ) ;
public static bool IsMachineConnectedToInternet( )
{
int desc ;
return InternetGetConnectedState( out desc, 0 ) ;
}
}
No comments:
Post a Comment