3
Trying to connect to the Bluetooth Printer gives the following error. " No more data is available. (Exception from HRESULT: 0x80070103)".
This error only came from Visual Studio 2013, in Visual Studio 2012 It worked normal.
My Code.
PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "BlueTooth Printer";
var pairedDevices = await PeerFinder.FindAllPeersAsync();
if (pairedDevices.Count == 0)
{
MessageBox.Show("No paired devices were found.");
}
else
{
PeerInformation selectedDevice = pairedDevices[0];
StreamSocket socket = new StreamSocket();
await socket.ConnectAsync(selectedDevice.HostName, "1");
await socket.OutputStream.WriteAsync(WindowsRuntimeBufferExtensions.AsBuffer(buffer));
socket.Dispose();
}
This topic no msdn helps at something?
– Renan Gomes
@Thanks guy worked, now adds as an answer to I give you the points.
– Natanael Ribeiro Ferreira
Don’t worry about it, man. Put as answer to your solution and if you have found the reason for this exception to be released on VS2013 and not VS2012, also include. :)
– Renan Gomes