M
merco
I'm using .netcf v.20 over a windows 5.0 device (5.1.70).
I want to get some information about wifi using this code:
Public Function GetWLAN(ByVal DiChi As String) As Boolean
Dim ColAd As OpenNETCF.Net.AdapterCollection =
OpenNETCF.Net.Networking.GetAdapters
Dim ColAp As OpenNETCF.Net.AccessPointCollection
Dim a As OpenNETCF.Net.Adapter
For Each a In ColAd
MsgBox(a.Name)
ColAp = Nothing
'ColAp = a.PreferredAccessPoints
'If IsNothing(ColAp) Then
' MsgBox("no acc")
' End If
If a.IsWireless Then
MsgBox("wir")
MsgBox(a.SignalStrength.Decibels.ToString)
Else
MsgBox(a.SignalStrengthInDecibels.ToString)
End If
Next
ColAd = Nothing
a = Nothing
End Function
It seems that a.iswireless is always false, even when i am connected.
a.SignalStrengthInDecibels.ToString has always a value: 0 is the card
is disabled, -50 if the card is enabled.
If i try to get some accesspoint info i get a runtime error...
Some ideas?
thank you
I want to get some information about wifi using this code:
Public Function GetWLAN(ByVal DiChi As String) As Boolean
Dim ColAd As OpenNETCF.Net.AdapterCollection =
OpenNETCF.Net.Networking.GetAdapters
Dim ColAp As OpenNETCF.Net.AccessPointCollection
Dim a As OpenNETCF.Net.Adapter
For Each a In ColAd
MsgBox(a.Name)
ColAp = Nothing
'ColAp = a.PreferredAccessPoints
'If IsNothing(ColAp) Then
' MsgBox("no acc")
' End If
If a.IsWireless Then
MsgBox("wir")
MsgBox(a.SignalStrength.Decibels.ToString)
Else
MsgBox(a.SignalStrengthInDecibels.ToString)
End If
Next
ColAd = Nothing
a = Nothing
End Function
It seems that a.iswireless is always false, even when i am connected.
a.SignalStrengthInDecibels.ToString has always a value: 0 is the card
is disabled, -50 if the card is enabled.
If i try to get some accesspoint info i get a runtime error...
Some ideas?
thank you