Since WinRT Components use C++/CX the wrapper can be used in Universal Windows Platform (UWP) apps that are written in C#, Visual Basic, JavaScript, and other languages that support the Windows Runtime. For example, it can be used in a HoloLens application like CompanionMR.
Feel free to use the provided sample app as a starting point. Unfortunately CMake is currently not able to integrate the C# project to the generated Visual Studio Solution automatically. Follow these steps to do that manually:
CompanionWinRT.sln
in Visual Studio.Go to File
> Add
> Existing Project...
and select the project file <build_dir>\CompanionUWPSample\CompanionUWPSample.csproj
.
> Be aware that the sample project is being copied to the build directory so it won’t be under version control.
Add CompanionWinRT
as a reference to the CompanionUWPSample
project: right click on the project name and choose Add
> Reference...
.
Right click on CompanionUWPSample
and choose Set as StartUp Project
.
Add your OpenCV DLLs to the project by right clicking on CompanionUWPSample
and choosing Add
> Existing Item...
.