I am trying to use the UWP OCR API from a Win32 application. https://learn.microsoft.com/en-us/uwp/api/windows.media.ocr.ocrengine
I've succeeded in actually using it using it from both C#: https://blogs.windows.com/windowsdeveloper/2019/04/30/calling-windows-10-apis-from-a-desktop-application-just-got-easier/
and C++ using C++/WinRT
in a Win32 application.
However, I cannot tell if this is or should be a supported scenario, or whether the documentation is up to date and accurate.
are "APIs supported only in apps with package identity". However there is also this vague note:
"Occasionally, APIs in these areas may appear to function correctly. However, if an API is not explicitly listed as supported, you should avoid using it as it may have unintended side effects or behavior. Support for these APIs may become available in future releases. In the interim, your app should use relevant Win32 or .NET APIs instead."
Of course, there are no Win32 OCR apis....
There was a sample app available at some point but it was removed for some reason: