【问题标题】:Supressing System Dialog when pairing Bluetooth devices using Win 7 or Win 10使用 Win 7 或 Win 10 配对蓝牙设备时抑制系统对话框
【发布时间】: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

【问题讨论】:

    标签: .net bluetooth


    【解决方案1】:

    没有简单的方法可以做到这一点。然而,我们的蓝牙框架可以通过使用未记录的方式来做到这一点。适用于任何 Windows 平台。

    我不能分享代码,但我可以给你想法。您必须禁用身份验证代理。

    【讨论】:

    • 感谢您的提示。我可以在 feet32 内或直接针对 WinAPI 或在您的蓝牙框架中执行此操作,就您的框架而言,它是公开可用的还是非常封闭的?
    • 你必须使用 WinAPI。请通过 Skype 与我联系,我将提供代码(抱歉,仅供您个人使用)。
    • 忘记给你一个Skype ID:mike.petrichenko
    猜你喜欢
    • 2012-04-19
    • 1970-01-01
    • 2016-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-22
    • 1970-01-01
    相关资源
    最近更新 更多