public Win32BluetoothAuthentication(BluetoothAddress address, string pin) { Address = address; _pin = pin; BLUETOOTH_DEVICE_INFO device = BLUETOOTH_DEVICE_INFO.Create(); device.Address = address; Win32Native.BluetoothGetDeviceInfo(IntPtr.Zero, ref device); _callback = new BluetoothAuthenticationCallbackEx(Callback); int result = Win32Native.BluetoothRegisterForAuthenticationEx(ref device, out _handle, _callback, IntPtr.Zero); }