"The requested allocation size was too large" when calling PeerFinder.Start();

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?

c#
windows-8
bluetooth
windows-store-apps
asked on Stack Overflow Apr 14, 2013 by anderZubi

2 Answers

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.

answered on Stack Overflow Sep 10, 2013 by anderZubi • edited Oct 17, 2014 by anderZubi
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.

answered on Stack Overflow Jun 24, 2013 by Jieqin • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0