BluetoothDevice.GetDeviceSelectorFromDeviceName(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個進階查詢語法(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 字串的藍牙裝置名稱。
傳回
一個 AQS 字串,作為參數傳遞給 CreateWatcher 方法。
Windows 需求
| 規格需求 | Description |
|---|---|
| 裝置系列 |
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
|