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

来源:互联网 发布:淘宝如何入驻拼多多 编辑:程序博客网 时间:2024/06/05 15:57

如果服务器想获得其他设备与自己的连接情况,可以使用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 );

0 1
原创粉丝点击