WinCE蓝牙控制API函数 .

对于蓝牙的设置还可以直接使用现有的API函数:BthSetMode(), BthGetMode().
这两个函数定义在:bthutil.h,然后需要添加依赖的LIB库:Bthutil.lib
int BthSetMode(
      DWORD
      dwMode
);

int BthGetMode(
      DWORD*
      pdwMode
);

Return Value
Returns ERROR_SUCCESS on success or returns an error code on failure.

其中dwMode的值有三个,一个是关闭,打开有两个:一个是可以被搜索到,另外一个是不可以被搜索到.

值定义如下:

enum BTH_RADIO_MODE {
  BTH_POWER_OFF,
  BTH_CONNECTABLE,
  BTH_DISCOVERABLE
};
posted @ 2012-08-19 18:37  LoongEmbedded  阅读(146)  评论(0编辑  收藏  举报