NetworkInterface.Bind()

Last post 12-17-2009 9:31 by ctacke. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-17-2009 8:16

    NetworkInterface.Bind()

    Could someone please explain when the functions NetworkInterface.Bind(), Rebind, Unbind should be used?  I have the following code that I use to find nearby access points:

    Dim NoAPs As Boolean = True
    Dim ReturnValues As AccessPointCollection

            While (NoAPs)
                AddStatus("Searching for the network...", True)
                If CopyProgressBar.Value >= CopyProgressBar.Maximum Then
                    Exit Sub
                End If
                Threading.Thread.Sleep(2000)
                _ZeroConfigInterface.Refresh()           
                ReturnValues = _ZeroConfigInterface.NearbyAccessPoints
                If ReturnValues.Count > 0 Then
                    NoAPs = False
                End If
            End While

    I USUALLY find the nearby access points, but not always.  Sometimes this while loop will time out. I am grasping at straws and hoping the Bind function will make a difference.  Anyone have any pointers?

  • 12-17-2009 9:31 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 2,254

    Re: NetworkInterface.Bind()

    Bind is used to to tell NDIS to attach to an adapter.  It would be used after an Unbind.  Typically you would do this when you make changes (like to the static IP address, DNS, etc) by doing an Unbind and Bind, or calling Rebind, which does both. 

Page 1 of 1 (2 items)