BluetoothRegisterForAuthenticationEx function Null safety bthprops

int BluetoothRegisterForAuthenticationEx (
  1. Pointer<BLUETOOTH_DEVICE_INFO> pbtdiIn,
  2. Pointer<IntPtr> phRegHandleOut,
  3. Pointer<NativeFunction<PfnAuthenticationCallbackEx>> pfnCallbackIn,
  4. Pointer<NativeType> pvParam
)

The BluetoothRegisterForAuthenticationEx function registers an application for a pin request, numeric comparison and callback function.

DWORD BluetoothRegisterForAuthenticationEx(
  const BLUETOOTH_DEVICE_INFO            *pbtdiIn,
  HBLUETOOTH_AUTHENTICATION_REGISTRATION *phRegHandleOut,
  PFN_AUTHENTICATION_CALLBACK_EX         pfnCallbackIn,
  PVOID                                  pvParam
);

Implementation

int BluetoothRegisterForAuthenticationEx(
    Pointer<BLUETOOTH_DEVICE_INFO> pbtdiIn,
    Pointer<IntPtr> phRegHandleOut,
    Pointer<NativeFunction<PfnAuthenticationCallbackEx>> pfnCallbackIn,
    Pointer pvParam) {
  final _BluetoothRegisterForAuthenticationEx = _bthprops.lookupFunction<
      Uint32 Function(
          Pointer<BLUETOOTH_DEVICE_INFO> pbtdiIn,
          Pointer<IntPtr> phRegHandleOut,
          Pointer<NativeFunction<PfnAuthenticationCallbackEx>> pfnCallbackIn,
          Pointer pvParam),
      int Function(
          Pointer<BLUETOOTH_DEVICE_INFO> pbtdiIn,
          Pointer<IntPtr> phRegHandleOut,
          Pointer<NativeFunction<PfnAuthenticationCallbackEx>> pfnCallbackIn,
          Pointer pvParam)>('BluetoothRegisterForAuthenticationEx');
  return _BluetoothRegisterForAuthenticationEx(
      pbtdiIn, phRegHandleOut, pfnCallbackIn, pvParam);
}