在Visual Studio 2019中使用C ++ / WinRT:无法访问BluetoothLEAdvertisementWatcher [英] Using C++/WinRT in Visual Studio 2019: Cannot access BluetoothLEAdvertisementWatcher

查看:99
本文介绍了在Visual Studio 2019中使用C ++ / WinRT:无法访问BluetoothLEAdvertisementWatcher的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了设备功能并在pch.h文件中定义了标题,但是BluetoothLEAdvertisementWatcher一直给我一个未声明的标识符。如何访问和实例化该类?

I have set the Device capabilities and defined the header in the pch.h file, but BluetoothLEAdvertisementWatcher keeps giving me undeclared identifier. How do I access and instantiate that class?

我认为这不会得到回答。

I do not expect this will ever be answered.

推荐答案

我想我错过了使用声明。但是我已经搞砸了安装和项目模板,所以我不确定它是什么。我已经设法使用Core App(C ++ / winRT)项目模板来使BTLE扫描仪正常工作。现在我正在尝试
来弄清楚如何获取蓝牙代码并将其放入库中,以便任何UWP应用程序都可以使用它。
I think I was missing the using statement. But I have messed with installations and project templates so much I am not sure what it was. I have managed to use the Core App (C++/winRT) project template to get a BTLE scanner working. Now I am trying to figure out how to take that Bluetooth code and put it into a library so it can be used by any UWP app.


这篇关于在Visual Studio 2019中使用C ++ / WinRT:无法访问BluetoothLEAdvertisementWatcher的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆