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?