共用方式為


GattServiceProvider.CreateAsync(Guid) 方法

定義

使用指定的 serviceUuid 建立新的 GATT 服務

public:
 static IAsyncOperation<GattServiceProviderResult ^> ^ CreateAsync(Platform::Guid serviceUuid);
/// [Windows.Foundation.Metadata.Overload("CreateAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<GattServiceProviderResult> CreateAsync(winrt::guid const& serviceUuid);
[Windows.Foundation.Metadata.Overload("CreateAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<GattServiceProviderResult> CreateAsync(Guid serviceUuid);
function createAsync(serviceUuid)
Public Shared Function CreateAsync (serviceUuid As Guid) As IAsyncOperation(Of GattServiceProviderResult)

參數

serviceUuid
Guid

Platform::Guid

winrt::guid

服務 UUID。

傳回

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

屬性

Windows 需求

應用程式功能
bluetooth

適用於