connected to the network ????????
-
Hi does ne1 know the best way in c++ to detect if i have a network connection, ie. connected to the internet thanks si
Does this help? http://www.pcausa.com/resources/InetActive.txt
-
Hi does ne1 know the best way in c++ to detect if i have a network connection, ie. connected to the internet thanks si
-
Hi does ne1 know the best way in c++ to detect if i have a network connection, ie. connected to the internet thanks si
-
Hi does ne1 know the best way in c++ to detect if i have a network connection, ie. connected to the internet thanks si
I've been using the following function with success. It returns TRUE if a connection is available, and takes less than a sec in either case:
BOOL Online() { DWORD dwState = 0; DWORD dwSize = sizeof(DWORD); return InternetQueryOption(NULL, INTERNET_OPTION_CONNECTED_STATE, &dwState, &dwSize) && (dwState & INTERNET_STATE_CONNECTED); }
Credit: I got this from Paul Dilascia's column in MSDN mag a while back.