yes, i agree with you, we need a c++ plugin.
i take the project on
https://bitbucket.org/Unity-Technologies/windowsstoreappssamples
and i updated the two projects:
for the first one is used :
#include <windows.h>
#include <stdio.h>
#include <setupapi.h>
#include <devguid.h>
#include <regstr.h>
#include <bthdef.h>
#include <bthledef.h>
#include <Bluetoothleapis.h>
#pragma comment(lib, “SetupAPI”)
#pragma comment(lib, “BluetoothApis.lib”)
in the stdafx.h file and i based the projest on :
https://social.msdn.microsoft.com/Forums/lync/en-US/bad452cb-4fc2-4a86-9b60-070b43577cc9/is-there-a-simple-example-desktop-programming-c-for-bluetooth-low-energy-devices?forum=wdk
i added the function in stdafx.cpp to verify the compilation:
void SomethingHappened(BTH_LE_GATT_EVENT_TYPE EventType, PVOID EventOutParameter, PVOID Context)
for the second project (wsa plugins) t was more difficult because winrt wasn’t unable to compilate, i found the soultion as this:
in stdafx.h
// Windows Header Files:
#pragma comment(lib, “windowsapp”)
#include “Windows.Foundation.h”
#include “Windows.Web.Syndication.h”
#include “Windows.devices.bluetooth.h”
#include “Windows.devices.bluetooth.background.h”
#include “Windows.devices.bluetooth.advertisement.h”
and in the stdafx.cpp
#include “stdafx.h”
using namespace std;
using namespace Windows;
using namespace Windows:evices;
using namespace Windows:evices::Bluetooth;
using namespace Windows:evices::Bluetooth::Background;
using namespace Windows:evices::Bluetooth::Advertisement;
using namespace Windows:evices::Bluetooth::GenericAttributeProfile;
but to conclude the conpilation, you need to change the project as this:
use Windows extension runtime in the project properties Under C/C++ and General Yes(/ZW)
after you can compilate the basic dll standlone dll and the wsa with winrt plugin
it’s for the c++ part.
i’ll check for the c# dll plugin possibility a i already did the code for the wesu (st micro electronics) and the thingy from nordic.