共用方式為


BluetoothDevice.GetDeviceSelectorFromDeviceName(String) 方法

定義

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

public:
 static Platform::String ^ GetDeviceSelectorFromDeviceName(Platform::String ^ deviceName);
 static winrt::hstring GetDeviceSelectorFromDeviceName(winrt::hstring const& deviceName);
public static string GetDeviceSelectorFromDeviceName(string deviceName);
function getDeviceSelectorFromDeviceName(deviceName)
Public Shared Function GetDeviceSelectorFromDeviceName (deviceName As String) As String

參數

deviceName
String

Platform::String

winrt::hstring

用來建構 AQS 字串的藍牙裝置名稱。

傳回

String

Platform::String

winrt::hstring

作為參數傳遞至 CreateWatcher 方法的 AQS 字串。

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

適用於