共用方式為


GattDeviceService.ConvertShortIdToUuid(UInt16) 方法

定義

將藍牙 SIG 定義的簡短識別碼轉換為完整的 GATT UUID。

重要

ConvertShortIdToUuid API 已被取代,未來版本的 Windows 可能無法使用。 請改用 BluetoothUuidHelper.FromShortId

public:
 static Platform::Guid ConvertShortIdToUuid(unsigned short shortId);
 static winrt::guid ConvertShortIdToUuid(uint16_t const& shortId);
/// [Windows.Foundation.Metadata.Deprecated("Use BluetoothUuidHelper instead of ConvertShortIdToUuid.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
 static winrt::guid ConvertShortIdToUuid(uint16_t const& shortId);
public static Guid ConvertShortIdToUuid(ushort shortId);
[Windows.Foundation.Metadata.Deprecated("Use BluetoothUuidHelper instead of ConvertShortIdToUuid.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public static Guid ConvertShortIdToUuid(ushort shortId);
function convertShortIdToUuid(shortId)
Public Shared Function ConvertShortIdToUuid (shortId As UShort) As Guid

參數

shortId
UInt16

unsigned short

uint16_t

16 位藍牙 GATT 服務 UUID。

傳回

Guid

Platform::Guid

winrt::guid

對應 128 位 GATT 服務 UUID,可唯一識別此服務。

屬性

Windows 需求

應用程式功能
bluetooth

適用於