I have a C++ (Native code) DLL project developed for iOS and Android. I would like to port it to a C++ DLL (Universal Apps) to be consumed by a C# Universal Store Application. The code isn't HW dependent.
As a first step, before moving all the code, I created a small test solution as follows:
- I created a C++ DLL (Universal Apps), myDll, that has a C++
Add1(int, int)
function. - I created a C++ WinRT component (Universal Apps) that has C++
Add2(int, int)
function. - I created a C# Universal Application, myApp, that calls
Add2
which callsAdd1
.
Compilation passes OK, however when I run myApp the application crashes and report that myDll wasn't loaded.
My questions are:
- Is the scenario I described above possible? And If so, what can be the problem causing myApp to crash?
- Is there a better way for me to port the iOS/Android C++ code to be consumed in a C# Universal Application?
Thx