Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1072313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:50:21+00:00 2026-05-16T20:50:21+00:00

I am building a simple application that listens to NetworkAvailibilityChanged Event. It’s all good,

  • 0

I am building a simple application that listens to NetworkAvailibilityChanged Event. It’s all good, except in the case of a modem PPP interface connection, where the app gets notified of the availibility only when the network is connected but not when disconnected.

Am I missing anything? I tried it for LAN and it worked perfectly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:50:22+00:00Added an answer on May 16, 2026 at 8:50 pm

    Here is what the NetworkAvailbilityChanged touches.

    Friend Shared Function InternalGetIsNetworkAvailable() As Boolean
        If ComNetOS.IsWinNt Then
            Dim interface2 As NetworkInterface
            For Each interface2 In SystemNetworkInterface.GetNetworkInterfaces
                If (((interface2.OperationalStatus = OperationalStatus.Up) AndAlso (interface2.NetworkInterfaceType <> NetworkInterfaceType.Tunnel)) AndAlso (interface2.NetworkInterfaceType <> NetworkInterfaceType.Loopback)) Then
                    Return True
                End If
            Next
            Return False
        End If
        Dim flags As UInt32 = 0
        Return UnsafeWinINetNativeMethods.InternetGetConnectedState((flags), 0)
    End Function
    
    Private Shared Sub ChangedAddress(ByVal sender As Object, ByVal eventArgs As EventArgs)
        SyncLock AvailabilityChangeListener.syncObject
            Dim isNetworkAvailable As Boolean = SystemNetworkInterface.InternalGetIsNetworkAvailable
            If (isNetworkAvailable <> AvailabilityChangeListener.isAvailable) Then
                AvailabilityChangeListener.isAvailable = isNetworkAvailable
                Dim array As DictionaryEntry() = New DictionaryEntry(AvailabilityChangeListener.s_availabilityCallerArray.Count  - 1) {}
                AvailabilityChangeListener.s_availabilityCallerArray.CopyTo(array, 0)
                Dim i As Integer
                For i = 0 To array.Length - 1
                    Dim key As NetworkAvailabilityChangedEventHandler = DirectCast(array(i).Key, NetworkAvailabilityChangedEventHandler)
                    Dim context As ExecutionContext = DirectCast(array(i).Value, ExecutionContext)
                    If (context Is Nothing) Then
                        key.Invoke(Nothing, New NetworkAvailabilityEventArgs(AvailabilityChangeListener.isAvailable))
                    Else
                        ExecutionContext.Run(context.CreateCopy, AvailabilityChangeListener.s_RunHandlerCallback, key)
                    End If
                Next i
            End If
        End SyncLock
    End Sub
    

    According to these it seems that if its telling you there is network, it should also tell you there is not network. It also appears to work off of the Address for each device. When the Address changes, it calls ChangedAddress.

    Take a look at these and see if you get a clearer picture of what is going on behind the scenes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a simple application that has a few buttons that when clicked
I'm building a simple web application that handles a simple database using struts and
I'm building a very simple application .net Console Application that will execute a SQL
I am learning Python by building a simple PyGTK application that fetches data from
Hi I am building a simple application that will have a combo box to
Newbie question here! I'm building a simple application that allows users to create and
I am building a simple C# application that allows the user to edit the
I'm building a relatively simple class (ex: Person) for an ASP.NET application that has
I'm stuck on a simple issue here. I'm building an application that manages a
I'm building a simple Todo List application where I want to be able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.