BluetoothFindFirstRadio function

The BluetoothFindFirstRadio function begins the enumeration of local Bluetooth radios.

Syntax


HBLUETOOTH_RADIO_FIND BluetoothFindFirstRadio(
        BLUETOOTH_FIND_RADIO_PARAMS *pbtfrp,
  _Out_ HANDLE                      *phRadio
);

Parameters

pbtfrp

Pointer to a BLUETOOTH_FIND_RADIO_PARAMS structure. The dwSize member of the BLUETOOTH_FIND_RADIO_PARAMS structure pointed to by pbtfrp must match the size of the structure.

phRadio [out]

Pointer to where the first enumerated radio handle will be returned. When no longer needed, this handle must be closed via CloseHandle.

Return value

In addition to the handle indicated by phRadio, calling this function will also create a HBLUETOOTH_RADIO_FIND handle for use with the BluetoothFindNextRadio function. When this handle is no longer needed, it must be closed via the BluetoothFindRadioClose.

Returns NULL upon failure. Call the GetLastError function for more information on the error. The following table describe common errors:

Return codeDescription
ERROR_NO_MORE_ITEMS

No Bluetooth radios found.

ERROR_INVALID_PARAMETER

The pbtfrp parameter is NULL.

ERROR_REVISION_MISMATCH

The structure pointed to by pbtfrp is not the correct size.

ERROR_OUTOFMEMORY

Out of memory.

 

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

None supported

Header

BluetoothAPIs.h (include Bthsdpdef.h or BluetoothAPIs.h)

Library

Bthprops.lib

DLL

Bthprops.dll

See also

BluetoothFindNextRadio
BluetoothFindRadioClose
BluetoothGetRadioInfo
GetLastError
BLUETOOTH_FIND_RADIO_PARAMS

 

 

Community Additions

ADD
Show: