BluetoothGATTSetDescriptorValue function bluetoothapis

void BluetoothGATTSetDescriptorValue(
  1. HANDLE hDevice,
  2. Pointer<BTH_LE_GATT_DESCRIPTOR> descriptor,
  3. Pointer<BTH_LE_GATT_DESCRIPTOR_VALUE> descriptorValue,
  4. int flags,
)

Writes the specified descriptor value to the Bluetooth device.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/bluetoothleapis/nf-bluetoothleapis-bluetoothgattsetdescriptorvalue.

Implementation

@pragma('vm:prefer-inline')
void BluetoothGATTSetDescriptorValue(
  HANDLE hDevice,
  Pointer<BTH_LE_GATT_DESCRIPTOR> descriptor,
  Pointer<BTH_LE_GATT_DESCRIPTOR_VALUE> descriptorValue,
  int flags,
) {
  final hr$ = HRESULT(
    _BluetoothGATTSetDescriptorValue(
      hDevice,
      descriptor,
      descriptorValue,
      flags,
    ),
  );
  if (hr$.isError) throw WindowsException(hr$);
}