Funzione BluetoothFindFirstRadio (bluetoothapis.h)

La funzione BluetoothFindFirstRadio inizia l'enumerazione delle radio Bluetooth locali.

Sintassi

HBLUETOOTH_RADIO_FIND BluetoothFindFirstRadio(
        const BLUETOOTH_FIND_RADIO_PARAMS *pbtfrp,
  [out] HANDLE                            *phRadio
);

Parametri

pbtfrp

Puntatore a una struttura BLUETOOTH_FIND_RADIO_PARAMS . Il membro dwSize della struttura BLUETOOTH_FIND_RADIO_PARAMS puntato da pbtfrp deve corrispondere alle dimensioni della struttura.

[out] phRadio

Puntatore a dove verrà restituito il primo handle radio enumerato. Quando non è più necessario, questo handle deve essere chiuso tramite CloseHandle.

Valore restituito

Oltre all'handle indicato da phRadio, la chiamata a questa funzione creerà anche un handle HBLUETOOTH_RADIO_FIND da usare con la funzione BluetoothFindNextRadio . Quando questo handle non è più necessario, deve essere chiuso tramite BluetoothFindRadioClose.

Restituisce NULL in caso di errore. Chiamare la funzione GetLastError per altre informazioni sull'errore. La tabella seguente descrive gli errori comuni:

Codice restituito Descrizione
ERROR_NO_MORE_ITEMS
Nessuna radio Bluetooth trovata.
ERROR_INVALID_PARAMETER
Il parametro pbtfrp è NULL.
ERROR_REVISION_MISMATCH
La struttura puntata da pbtfrp non è la dimensione corretta.
ERROR_OUTOFMEMORY
Memoria insufficiente.

Requisiti

Requisito Valore
Client minimo supportato Windows Vista, Windows XP con SP2 [solo app desktop]
Server minimo supportato Nessuno supportato
Piattaforma di destinazione Windows
Intestazione bluetoothapis.h (includere Bthsdpdef.h, BluetoothAPIs.h)
Libreria Bthprops.lib
DLL bthprops.cpl

Vedi anche

BLUETOOTH_FIND_RADIO_PARAMS

BluetoothFindNextRadio

BluetoothFindRadioClose

BluetoothGetRadioInfo

Getlasterror