qtwindows-runtimewifi-directwrlqt5.6

What type of WinRT API do I have access to from Qt app?


I'm using Qt 5.6 Alpha WinRT port on Windows 10 and want to access WinRT's Wifi Direct API from Qt app.

I know that WRL should be used for that. But I get different behavior using Wifi Direct API in my app and trying Windows Universal example from Microsoft's GitHub repository. More specifically I get E_NOTIMPL when trying to activate WiFiDirectDevice, while Microsoft's sample works just fine.

HStringReference strDevice(RuntimeClass_Windows_Devices_WiFiDirect_WiFiDirectDevice);

ComPtr<IInspectable> insp;
hr = RoActivateInstance(strDevice.Get(), insp.GetAddressOf());

So I'm confused about what type of API I'm calling (windows store or desktop) from Qt app?


Solution

  • I'll try to answer myself, though I'm not 100% sure.

    Qt's documentation says that "Qt for WinRT allows you to run Qt applications on devices supporting the Windows Store App APIs." and "WinRT applications run in a sandboxed environment..."

    Based on this and the fact that separate Qt port for WinRT that does the same job as Windows Desktop Qt doesn't make sense, I can make an assumption that Qt port create Windows Store app and use Windows Store API.

    But I will really appreciate if someone confirm this.