bluetoothFindNextDevice 函数 (bluetoothapis.h)

BluetoothFindNextDevice 函数查找下一个蓝牙设备。

语法

BOOL BluetoothFindNextDevice(
  HBLUETOOTH_DEVICE_FIND hFind,
  BLUETOOTH_DEVICE_INFO  *pbtdi
);

参数

hFind

在上次调用 BluetoothFindFirstDevice 函数时获取的查询的句柄。

pbtdi

指向 BLUETOOTH_DEVICE_INFO 结构的指针,其中放置了有关找到的下一个蓝牙设备的信息。 pbtdi 指向的 BLUETOOTH_DEVICE_INFO 结构的 dwSize 成员必须与结构的大小匹配,否则对 BluetoothFindNextDevice 的调用将失败。

返回值

成功找到下一个设备时返回 TRUE,pbtdi 参数指向有关设备的信息。 出错时返回 FALSE 。 有关错误的详细信息,请调用 GetLastError 函数。 下表描述了常见错误:

返回代码 说明
ERROR_INVALID_HANDLE
句柄为 NULL
ERROR_NO_MORE_ITEMS
找不到更多设备。
ERROR_OUTOFMEMORY
内存不足。

要求

要求
最低受支持的客户端 Windows Vista、Windows XP SP2 [仅限桌面应用]
最低受支持的服务器 无受支持的版本
目标平台 Windows
标头 bluetoothapis.h (包括 Bthsdpdef.h、BluetoothAPIs.h)
Library Bthprops.lib
DLL bthprops.cpl

另请参阅

BLUETOOTH_DEVICE_INFO

BLUETOOTH_DEVICE_SEARCH_PARAMS

BluetoothDisplayDeviceProperties

BluetoothFindDeviceClose

BluetoothFindFirstDevice

BluetoothGetDeviceInfo

BluetoothRemoveDevice

BluetoothUpdateDeviceRecord