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

适用于