0

When executing the following lines in my Windows Store App project

PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";
PeerFinder.Start();

I get the following error:

The requested allocation size was too large (Exception from HRESULT: 0x80080011 (MEM_E_INVALID_SIZE))

Which is the problem there? How do I solve it?

anderZubi
  • 6,414
  • 5
  • 37
  • 67
  • What's your goal with this code? I think the only alternate identity available for you on Windows 8 was something like PeerFinder.AlternateIdentities["WindowsPhone"] = for app-to-app pairing (cf. [PeerFinder](http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.proximity.peerfinder.alternateidentities.aspx) doc and [this post](http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.proximity.peerfinder.alternateidentities.aspx). – Jim O'Neil Apr 15 '13 at 02:48
  • So, it is not possible to connect to paired bluetooth devices the same way it can be done in Windows Phone 8? – anderZubi Apr 15 '13 at 07:33

2 Answers2

1

It appears that it is not possible to connect a Windows Store app to a Bluetooth device the same way it can be done in Windows Phone 8.

While PeerFinder uses Bluetooth in Windows Phone 8, Wi-Fi Direct is used in Winsdows Store apps for peer discovery. That said, it seems the scenario of connecting a Windows Store app to a Bluetooth device is not currently possible.

anderZubi
  • 6,414
  • 5
  • 37
  • 67
0

If you are developing App to Device, PeerFinder.AlternateIdentities["Bluetooth:Paired"] = ""; is correct. Look at this.

The solution to you receiving this message “The requested allocation size was too large”is to remove PeerFinder.Start();. It should work.

I'm also working on Windows Store App for Bluetooth. But so far, it's not working. The method FindAllPeerAsync kept giving me null - nothing is found. If you managed to get Bluetooth working, please advice me and well.

Community
  • 1
  • 1
Jieqin
  • 588
  • 5
  • 21