Is the OCR API supported from Win32 Applications without package identity?

Hill, Tim 11 Reputation points

I am trying to use the UWP OCR API from a Win32 application.

I've succeeded in actually using it using it from both C#:
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.

According to:


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:

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Fay Wang - MSFT 5,151 Reputation points


    ​Welcome to Microsoft Q&A!

    From APIs supported only in apps with package identity, OCR API indeed requires package identity. And there are remarks mentioning that it may also take effect in other cases. So according to this document, it's better to package your win32 application into msix mode. Since when you package it in an MSIX package, it will grant package identity to a desktop app.

    0 comments No comments