How to disconnect a Bluetooth (not LE) device from windows computer in UWP/.NetCore/etc.?

Marjan Khan 25 Reputation points

I have a Bluetooth device connected to my computer. The following is the state of the device in Bluetooth & Other Devices list. I want to disconnect it from the computer using any API of desktop/UWP app (e.g., IOCTL etc.).


So I want to make it to the following state programmatically:


How can I do that?

Microsoft Technologies based on the .NET software framework.
3,459 questions
Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Roy Li - MSFT 32,486 Reputation points Microsoft Vendor

    Hello, Welcome to Microsoft Q&A!

    This is a summary for the question so that other people who are facing the same issue could check. A workaround is to use the IOCTL_BTH_DISCONNECT_DEVICE IOCTL. It's a win32 API comes from bthioctl.h. This API could disconnect the Bluetooth device from the computer.

    Thank you.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful