Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Using the provided Win10 IoT libraries in C++/CX UWP app?

The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi

17/08/2016

Posted by:
mmccullo

mmccullo Avatar

I can't seem to find a way to integrate the provided C# class library into a UWP C++/CX app. Is there a way to do this?I tried including the project in my solution and then referencing it in my C++/CX app, but it fails to find the ABElectronics_Win10IOT_Libraries namespace when compiling the C++/CX code.Thanks

18/08/2016

Posted by:
mmccullo

mmccullo Avatar

After further review it appears I have to change the output type of the project to "Windows Runtime Component" instead of "Class Library".Then it requires some code changes such as no "Task" return type and I couldn't quickly figure out how to make the "Connected" event compatible -- so I deleted it. However, with those deletions it linked with my C++/CX code using nothing but a reference to the project.EDIT: At runtime it crashes and burns with a null activation factory (3rd argument) to GetActivationFactoryByPCWSTR() when you try to create a new port with "ref new IOPi()". I could not figure out how to make it work at this time.Perhaps consider making modifications to the libraries to allow linking with C++/CX code. Microsoft provides several of the Win10 IoT examples in both C# and C++/CX languages.

18/08/2016

Posted by:
andrew

andrew Avatar

I don't have any experience with writing Windows C++/CX applications so I will need to do some research but I will see if it is possible to make the Windows IOT libraries compatible.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout