C++/WinRT background task (non UWP)

JafarM 1 Reputation point

Hi, I'm looking to create a win32 app utilizing WinRT to use UWP Background Task

I tried to find some samples on the internet and I found two main "official" repos


and here

I also found this

but in the end this is seems to be a starter point and later the samples were published under this

And the formal doc for it is this

My initial goal was to create a Win32 app that loads a WinRT component / library (load the .winmd file).
This works well and I can use WinRT "space" from win32 and use all the available apis.

Next I wanted to create a background task based on the interface.
Found the samples, they work for UWP but are crashing on me for C++/WinRT and COM samples above.

I've ran them on three different machines, same result. I must be doing something wrong or something is missing.

Next, I've tried to not use COM and try to use the code to run from the C++/WinRT component I have created,
and the same thing happened, it crashes on me.

In this case I know that the manifest manifest file also plays an important role, but I don't know the correct format it has to be in as for other projects the XML starts with "Package" for the win32 migrated project is starts with "assembly"

For example crashes and the xml see the attached pictures.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,483 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,600 questions
{count} votes