【发布时间】:2014-12-05 14:28:13
【问题描述】:
我正在尝试从我的 windows Phone silverlight 8.1 应用程序连接到蓝牙打印机,但在 _socket.ConnectAsync() 方法处出现以下异常
{System.Exception: Element not found. (Exception from HRESULT: 0x80070490)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at PhoneApp1.MainPage.<ConnectToDevice>d__4.MoveNext()}
我的应用在 BLUEBIRD Windows 8.1 手持设备上运行。 我的代码看起来像
_socket = new StreamSocket();
await _socket.ConnectAsync(peer.HostName ,"1" );
我启用了 internetClientServer 和邻近功能
相同的代码适用于以 Windows Phone 8 为目标的应用
【问题讨论】:
标签: c# sockets silverlight windows-phone-8 bluetooth