【发布时间】:2018-03-24 20:19:09
【问题描述】:
我使用 feet32 库成功地将蓝牙设备与 Win 7 和 Win 10 自动配对。不幸的是,出现了一个系统对话框,说“点击配对”在Win 7下,如果我点击对话框,它就会配对。在 Win 10 下,如果我不触摸对话框,它不会配对。 实际上,有一个 Win 10 选项,可以关闭对话框,但也不会进行配对。 在 Win 7 下会调用 handlerequests,在 Win 10 下不会。
在 Win 7 下它仍然可以配对。
Dim pairer As New BluetoothWin32Authentication(AddressOf handleRequests )
Public Sub handleRequests(ByVal thing As Object, ByVal args As BluetoothWin32AuthenticationEventArgs)
args.Confirm = True
End Sub
Protected Function TryRemember(ByVal peer As BluetoothDeviceInfo) As Boolean
If peer Is Nothing Then Return False
Return BluetoothSecurity.PairRequest(peer.DeviceAddress, Nothing )
End Function
【问题讨论】: