Is there a way to detect if a Broadcom Bluetooth device is turned on using
code?
Thanks to Unc, I know how to set the device:
HMODULE hBFM = LoadLibrary(TEXT("BtFlightModeCtl.dll"));
if (hBFM)
{
HRESULT (WINAPI *OEMSetBthPowerState)(DWORD);
OEMSetBthPowerState =
(HRESULT (WINAPI*)(DWORD))
(GetProcAddress(hBFM, TEXT("OEMSetBthPowerState")));
}
where:
OEMSetBthPowerState(TRUE)
turns a Broadcom device ON
and:
OEMSetBthPowerState(FALSE)
turns a Broadcom device OFF
But, if the device is already turned on when I start my code, I want to
leave it on whenever I am done.