Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BT: First attempt to disconnnect can (will?) fail #191

Open
Aemony opened this issue Jul 7, 2024 · 0 comments
Open

BT: First attempt to disconnnect can (will?) fail #191

Aemony opened this issue Jul 7, 2024 · 0 comments

Comments

@Aemony
Copy link
Contributor

Aemony commented Jul 7, 2024

I am unsure of the context surrounding this specific block of code, but as I used this in another app/tool I am working on, I noticed that the first block of code that attempts to disconnect the Bluetooth device will fail as hFindRadios is never assigned the return value of BluetoothFindFirstRadio.

HANDLE hFindRadios = INVALID_HANDLE_VALUE;
BluetoothFindFirstRadio (&findParams, &hBtRadio);
if ((intptr_t)hFindRadios > 0 && (intptr_t)hBtRadio > 0)


I assume the variable assignment for hFindRadios should be the same as it is further down the file:

HANDLE hFindRadios =
BluetoothFindFirstRadio (&findParams, &hBtRadio);
if (hFindRadios != 0 && hFindRadios != INVALID_HANDLE_VALUE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant