BluetoothFindFirstRadio 函式 (bluetoothapis.h)

BluetoothFindFirstRadio 函式會開始列舉本機藍牙無線電。

語法

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

參數

pbtfrp

BLUETOOTH_FIND_RADIO_PARAMS 結構的指標。 pbtfrp 所指向之BLUETOOTH_FIND_RADIO_PARAMS結構的 dwSize 成員必須符合 結構的大小。

[out] phRadio

將傳回第一個列舉單選句柄的指標。 當不再需要時,必須透過 CloseHandle 關閉此句柄。

傳回值

除了 phRadio 所指示的句柄之外,呼叫此函式也會建立HBLUETOOTH_RADIO_FIND句柄,以便與 BluetoothFindNextRadio 函式搭配使用。 不再需要此句柄時,必須透過 BluetoothFindRadioClose 關閉此句柄。

失敗時傳回 NULL 。 如需錯誤的詳細資訊,請呼叫 GetLastError 函式。 下表描述常見的錯誤:

傳回碼 Description
ERROR_NO_MORE_ITEMS
找不到藍牙無線電。
ERROR_INVALID_PARAMETER
pbtfrp 參數為 NULL
ERROR_REVISION_MISMATCH
pbtfrp 所指向的結構不是正確的大小。
ERROR_OUTOFMEMORY
記憶體不足。

規格需求

需求
最低支援的用戶端 Windows Vista、Windows XP SP2 [僅限傳統型應用程式]
最低支援的伺服器 都不支援
目標平台 Windows
標頭 bluetoothapis.h (包括 Bthsdpdef.h、BluetoothAPIs.h)
程式庫 Bthprops.lib
Dll bthprops.cpl

另請參閱

BLUETOOTH_FIND_RADIO_PARAMS

BluetoothFindNextRadio

BluetoothFindRadioClose

BluetoothGetRadioInfo

GetLastError