I develop an UMDF2.0 driver using VS2019. Inside this driver I need to communicate with an BLE device. I have to use BluetoothLEDevice class to do this. This is a WinRT Api. I'm completely lost on how to call C++/WinRT from my driver. Does anyone have experienced this situation ?
Thank a lot for your great support,
EDIT 1#
I use the following simple test code in new cpp file into umdf2 sample project:
#include <windows.devices.h>
#include <windows.devices.bluetooth.h>
#include <windows.devices.bluetooth.genericattributeprofile.h>
using namespace ABI::Windows::Devices::Bluetooth;
void testBle()
{
BluetoothLEDevice dev;
}
I have the following error :
Error C2079 'dev' uses a class of 'ABI::Windows::Devices::Bluetooth::BluetoothLEDevice' not defined
EDIT 2
I found one usefull project on GitHub that help me a lot to make all this work. Please find the link below :
https://github.com/bucienator/ble-win-cpp
Thank you again for your help