I am busy porting an app to UWP, but I am coming across an issue with XPS support on Windows 10 Mobile.
When creating an instance of IXpsOMObjectFactory
with the ID of CLSID_XpsOMObjectFactory
, it gives me the return value of REGDB_E_CLASSNOTREG
.
This is the code:
IXpsOMObjectFactory* fXpsFactory;
HRESULT hr = CoCreateInstance(
CLSID_XpsOMObjectFactory,
nullptr,
CLSCTX_INPROC_SERVER,
IID_PPV_ARGS(&fXpsFactory));
This works fine on the "desktop" machine, but when running on mobile - device and emulator - it errors.
I am doing a UWP app - I just created a new Universal C++ app and stuck the code in the main page. This code is part of a larger code base, so hopefully there is a solution that doesn't involve stacks of code changes.