您的位置:首页 > 其它

WINCE蓝牙服务器获得被其他设备连接信息

2015-07-16 13:13 260 查看
如果服务器想获得其他设备与自己的连接情况,可以使用BthGetBasebandConnections接口,第一个参数入力参数,第二个和第三个参数为出力参数,连接的设备信息和连接数目。

BASEBAND_CONNECTION connections[1] = {0};
int cConnectionsIn = 1;
int cConnectionsOut = 0;

/* Wait connected by bluetooth sender */

BASEBAND_CONNECTION* pConnections = connections;
int iErr = 0;
do
{
<span style="white-space:pre"> </span>iErr = BthGetBasebandConnections(cConnectionsIn, pConnections, &cConnectionsOut);

if ( cConnectionsOut > 0 )
{
<span style="white-space:pre"> </span>break;
}
else
{
Sleep(500);
}
} while ( TRUE );
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: