I am writing a windows service code in c# that will prevent from a user to set the "Turn discovery on" and "Allow Bluetooth devices to connect to this computer" in the Bluetooth Devices options window
on windows XP/windows 7 OS. However, when the "Turn discovery on" is set from this Bluetooth Devices window I cannot change the radio mode from my service (or any application I've wrote) using the InTheHand library.
it stays always on "Discoverable" mode no matter what I do, unless I unchecked it in the Bluetooth Devices window.
If the "Turn discovery on" is not checked everything is working well PowerOff/Connectable/Discoverable are set properly.
I assume that the Bluetooth stack is somehow holding this state.
My simple code is:
if (InTheHand.Net.Bluetooth.BluetoothRadio.IsSupported == true)
InTheHand.Net.Bluetooth.BluetoothRadio.PrimaryRadio.Mode = InTheHand.Net.Bluetooth.RadioMode.PowerOff;
What can I do to force this radio mode change.
Thanks in advance,