My question is whether there are certain limitations to accessing COM objects when you're dealing with an MSIX-packaged app.
I've created a blank WinUI 3 C++ project, using the Visual Studio project template. In the project, I've created a traditional COM class that's registered at runtime using CoRegisterClassObject
. I do not otherwise register the object in the registry. It's a singleton that's supposed to be accessible only when the .exe is already launched.
Now when I modify the project to be unpackaged, and the .exe is launched, I'm able to access the singeton class from another process, by calling CoCreateInstance
. Everything works as designed.
But when I change the MSIX project back to the packaged setup, the call to CoCreateInstance
from the unpackaged process now fails, with code REGDB_E_CLASSNOTREG
.
It's like trying to connect to a COM object when there's an unelevated/elevated mismatch. Same error.
So are unpackaged processes unable to access COM objects registered with CoRegisterClassObject
in MSIX-packaged apps? Is there a workaround or anything? Thanks in advance.