Hi
I am creating a new UWP app on windows 10 and I want to call functions from C++ DLL. Can anyone please tell me process to include the DLL in my UWP project and how do I call the C++ functions from C# UWP app?
Thanks in advance
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Milan Prajapati107 reputationPosted Oct 20, 2016, 4:42 AM EDT
You need to make sure your Python dll is not using prohibited APIs in WinRT. You can check this by using /ZW compile option for the dll.Add win32 dll into your UWP project making sure to set its type as 'content'
Then in the proper cs file, using DllImport to PInvoke the dll.