共用方式為


GattDeviceService.OpenAsync(GattSharingMode) 方法

定義

使用指定的 sharingMode 開啟 GATT 裝置服務。

public:
 virtual IAsyncOperation<GattOpenStatus> ^ OpenAsync(GattSharingMode sharingMode) = OpenAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GattOpenStatus> OpenAsync(GattSharingMode const& sharingMode);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GattOpenStatus> OpenAsync(GattSharingMode sharingMode);
function openAsync(sharingMode)
Public Function OpenAsync (sharingMode As GattSharingMode) As IAsyncOperation(Of GattOpenStatus)

參數

sharingMode
GattSharingMode

共用模式。

傳回

使用 GattOpenStatus 物件完成的非同步作業。

屬性

Windows 需求

裝置系列
Windows 10 Creators Update (已於 10.0.15063.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v4.0 引進)
應用程式功能
bluetooth

適用於