BluetoothSetServiceState function Null safety bthprops

int BluetoothSetServiceState (
  1. int hRadio,
  2. Pointer<BLUETOOTH_DEVICE_INFO> pbtdi,
  3. Pointer<GUID> pGuidService,
  4. int dwServiceFlags
)

The BluetoothSetServiceState function enables or disables services for a Bluetooth device.

DWORD BluetoothSetServiceState(
  HANDLE                      hRadio,
  const BLUETOOTH_DEVICE_INFO *pbtdi,
  const GUID                  *pGuidService,
  DWORD                       dwServiceFlags
);

Implementation

int BluetoothSetServiceState(int hRadio, Pointer<BLUETOOTH_DEVICE_INFO> pbtdi,
    Pointer<GUID> pGuidService, int dwServiceFlags) {
  final _BluetoothSetServiceState = _bthprops.lookupFunction<
      Uint32 Function(IntPtr hRadio, Pointer<BLUETOOTH_DEVICE_INFO> pbtdi,
          Pointer<GUID> pGuidService, Uint32 dwServiceFlags),
      int Function(
          int hRadio,
          Pointer<BLUETOOTH_DEVICE_INFO> pbtdi,
          Pointer<GUID> pGuidService,
          int dwServiceFlags)>('BluetoothSetServiceState');
  return _BluetoothSetServiceState(hRadio, pbtdi, pGuidService, dwServiceFlags);
}