Very interesting code
Private Sub cmdRadioScan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRadioScan.Click
lstRadios.Items.Clear()
Try
Dim Radios As wclBluetoothRadios = WclBluetoothDiscovery1.EnumRadios()
Try
For i As Integer = 0 To Radios.Count - 1
Dim radio As wclBluetoothRadio
radio = Radios(i)
Dim Address As String = ""
Try
Address = radio.Address
Catch es As Exception
Address = es.Message
End Try
lstRadios.Items.Add(Address)
Next
Finally
Radios = Nothing
End Try
Finally
End Try
End Sub
===================================
Private Function GetSelectedRadio() As wclBluetoothRadio
Dim Result As wclBluetoothRadio = Nothing
If lstRadios.SelectedItems.Count = 0 Then
MessageBox.Show("Select radio", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Else
Result = New wclBluetoothRadio()
Try
WclBluetoothDiscovery1.Discovery(lstRadios.Items(0))
Result.API = WclBluetoothDiscovery1.StringToBluetoothAPI(lstRadios.Items(0))
Catch exep As Exception
MsgBox(exep.Message)
Result = Nothing
End Try
End If
Return Result
End Function
Please, look at the selected (bold text) code lines and think, what is the difference between bluetooth address and bluetooth API name.