I'm trying to use the BLE feature of the winodws 10 laptop. I've first used the c# based examples available here . I can use the laptop as a BLE peripheral mode as well as the server mode. Now I'd like to implement the same feature in c++. I've found that the API that I should use to implement this is found here.
I followed this example to implement an initial server mode in the windows 10 laptop computer. But I first need the peripheral mode and I tried to add the class ID of my BLE device found from the device manager.
But the SetupDiEnumDeviceInterfaces
function fails with the error code 0x103 (No further information)
hDI = SetupDiGetClassDevs(&BluetoothInterfaceGUID, NULL, NULL, DIGCF_PRESENT);
if (hDI == INVALID_HANDLE_VALUE) return NULL;
did.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
dd.cbSize = sizeof(SP_DEVINFO_DATA);
BOOL isComplete = SetupDiEnumDeviceInterfaces(hDI, NULL, &BluetoothInterfaceGUID, 0, &did);
Any idea why this call fails? Should I be using any other GUID instead of the class GUID?