Delen via


BluetoothLEDevice.GetGattService(Guid) Method

Definition

Returns the GATT service with the given service Id.

Important

The GetGattService API is deprecated, and it may not be available in future versions of Windows. Instead, use GetGattServicesAsync.

public:
 virtual GattDeviceService ^ GetGattService(Platform::Guid serviceUuid) = GetGattService;
GattDeviceService GetGattService(winrt::guid const& serviceUuid);
/// [Windows.Foundation.Metadata.Deprecated("Use GetGattServicesForUuidAsync instead of GetGattService.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
GattDeviceService GetGattService(winrt::guid const& serviceUuid);
public GattDeviceService GetGattService(Guid serviceUuid);
[Windows.Foundation.Metadata.Deprecated("Use GetGattServicesForUuidAsync instead of GetGattService.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public GattDeviceService GetGattService(Guid serviceUuid);
function getGattService(serviceUuid)
Public Function GetGattService (serviceUuid As Guid) As GattDeviceService

Parameters

serviceUuid
Guid

Platform::Guid

winrt::guid

The service Id of the GATT service.

Returns

The GATT service represented by the given service Id.

Attributes

Windows requirements

App capabilities
bluetooth

Applies to