BluetoothFindNextDevice function (bluetoothapis.h)

The BluetoothFindNextDevice function finds the next Bluetooth device.

Syntax

BOOL BluetoothFindNextDevice(
  HBLUETOOTH_DEVICE_FIND hFind,
  BLUETOOTH_DEVICE_INFO  *pbtdi
);

Parameters

hFind

Handle for the query obtained in a previous call to the BluetoothFindFirstDevice function.

pbtdi

Pointer to a BLUETOOTH_DEVICE_INFO structure into which information about the next Bluetooth device found is placed. The dwSize member of the BLUETOOTH_DEVICE_INFO structure pointed to by pbtdi must match the size of the structure, or the call to BluetoothFindNextDevice fails.

Return value

Returns TRUE when the next device is successfully found, and the pbtdi parameter points to information about the device. Returns FALSE upon error. Call the GetLastError function for more information on the error. The following table describe common errors:

Return code Description
ERROR_INVALID_HANDLE
The handle is NULL.
ERROR_NO_MORE_ITEMS
No more devices were found.
ERROR_OUTOFMEMORY
Out of memory.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header bluetoothapis.h (include Bthsdpdef.h, BluetoothAPIs.h)
Library Bthprops.lib
DLL bthprops.cpl

See also

BLUETOOTH_DEVICE_INFO

BLUETOOTH_DEVICE_SEARCH_PARAMS

BluetoothDisplayDeviceProperties

BluetoothFindDeviceClose

BluetoothFindFirstDevice

BluetoothGetDeviceInfo

BluetoothRemoveDevice

BluetoothUpdateDeviceRecord