Example #1
0
        private static string GetConnectedState()
        {
            RASInfo.InternetConnectionState internetConnectionState = (RASInfo.InternetConnectionState) 0;

            if (RASInfo.InternetGetConnectedState(ref internetConnectionState, 0))
            {
                return("CONNECTED (" + internetConnectionState.ToString() + ")");
            }
            return("NOT_CONNECTED (" + internetConnectionState.ToString() + ")");
        }
Example #2
0
 internal static extern bool InternetGetConnectedState(ref RASInfo.InternetConnectionState lpdwFlags, int dwReserved);