Share via


BluetoothDevice.GetDeviceSelectorFromPairingState(Boolean) 方法

定義

建立進階查詢語法 (AQS) 篩選字串,其中包含配對或未配對藍牙裝置的查詢。 AQS 字串會傳遞至 CreateWatcher 方法,以傳回 DeviceInformation 物件的集合。

public:
 static Platform::String ^ GetDeviceSelectorFromPairingState(bool pairingState);
 static winrt::hstring GetDeviceSelectorFromPairingState(bool const& pairingState);
public static string GetDeviceSelectorFromPairingState(bool pairingState);
function getDeviceSelectorFromPairingState(pairingState)
Public Shared Function GetDeviceSelectorFromPairingState (pairingState As Boolean) As String

參數

pairingState
Boolean

bool

用於建構 AQS 字串的藍牙裝置目前配對狀態。 藍牙裝置可以是配對 (true) 或未配對的 (false) 。 當 pairingState 為 false 時,AQS 篩選字串會要求執行掃描。

傳回

String

Platform::String

winrt::hstring

AQS 字串,可當做參數傳遞至 CreateWatcher 方法。

Windows 需求

裝置系列
Windows 10 (已於 10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v2.0 引進)
應用程式功能
bluetooth

適用於