gpt4 book ai didi

c++ - 有没有办法使用winapi打开蓝牙?

转载 作者:行者123 更新时间:2023-12-02 10:17:31 32 4
gpt4 key购买 nike

我正在寻找一种仅使用Windows API打开计算机蓝牙的方法。我没有在BluetoothApis.h中看到任何功能。如果您知道任何方式(也许使用Device API),我希望听到!

这是我想使用Windows API打开的设置:

image

最佳答案

我不知道Win32 API,但是可以通过Windows Runtime API Windows.Devices.Radios轻松完成。可以将RadioState枚举设置为OnOffDisabled

UWP示例是here

对于Win32应用程序,仍然可以访问Windows运行时API,例如,使用VC++ /ZM标志(“使用Windows运行时扩展”)进行编译,并在启动时调用Windows::Foundation::Initialize();,如Microsoft博客中的How to access the Windows 10 APIs from C++所述。

关于c++ - 有没有办法使用winapi打开蓝牙?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61457392/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com