Connect to a paired Bluetooth device from C#.

PolarGoose 11 Reputation points
2022-02-01T18:40:41.643+00:00

It is a duplicate of my question on StackOverflow.
There is a "Connect" and "Disconnect" buttons in Windows Bluetooth settings.
170321-image.png
I want to create a console application which would make Windows connect and disconnect from my Bluetooth Headphones or other Bluetooth devices. However, I can't find a proper API to do that.
I have done some investigation described here but none of the ways I have found worked.

Could you help me finding a proper API or a workaround?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,498 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,573 questions
{count} votes