请求的分配大小太大"调用PeerFinder.Start()时;

本文关键字:PeerFinder 调用 Start quot 分配 请求 | 更新日期: 2023-09-27 18:09:09

在我的Windows Store应用程序项目中执行以下行

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

我得到以下错误:

请求的分配大小太大(Exception from HRESULT: 0x80080011 (meme_invalid_size))

哪里出了问题?怎么解呢?

请求的分配大小太大"调用PeerFinder.Start()时;

似乎不可能像在Windows Phone 8中那样将Windows Store应用程序连接到蓝牙设备。

PeerFinder在Windows Phone 8中使用蓝牙,而Wi-Fi Direct在Windows Store应用程序中用于对等发现。也就是说,将Windows Store应用程序连接到蓝牙设备的场景目前似乎是不可能的。

如果你正在开发应用到设备,PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";是正确的。看这个

您收到“The requested allocation size was too large”消息的解决方法是移除PeerFinder.Start();。这应该行得通。

我也在为蓝牙的Windows商店应用程序工作。但到目前为止,它还不起作用。方法FindAllPeerAsync一直给我null -没有发现任何东西。如果你设法得到蓝牙工作,请建议我和好。