D
David Pope
Can someone point me in the right direction on how you can check to see if
you have an active internet connect?
Thanks,
David
you have an active internet connect?
Thanks,
David
Sergey Bogdanov said:You may try this:
bool IsConnected
{
get
{
int flags = 0;
return InternetGetConnectedStateEx(out flags, 0, 0, 0);
}
}
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedStateEx(out InetFlags
flags, int reservedValue, int dwNameLen, int dwReserved);
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
David said:Can someone point me in the right direction on how you can check to see if
you have an active internet connect?
Thanks,
David
Peter said:Hello Sergey,
In which namespace is the InetFlags ? Cann't find it or maybe I'm
overlooking something.
Regards
Peter
Sergey Bogdanov said:You may try this:
bool IsConnected
{
get
{
int flags = 0;
return InternetGetConnectedStateEx(out flags, 0, 0, 0);
}
}
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedStateEx(out InetFlags
flags, int reservedValue, int dwNameLen, int dwReserved);
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
David said:Can someone point me in the right direction on how you can check to see if
you have an active internet connect?
Thanks,
David
Hello Sergey,
In which namespace is the InetFlags ? Cann't find it or maybe I'm
overlooking something.
Regards
Peter
You may try this:
bool IsConnected
{
get
{
int flags = 0;
return InternetGetConnectedStateEx(out flags, 0, 0, 0);
}
}
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedStateEx(out InetFlags
flags, int reservedValue, int dwNameLen, int dwReserved);
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
ifDavid said:Can someone point me in the right direction on how you can check to see
you have an active internet connect?
Thanks,
David