AndrewSchmidt-2732 avatar image
1 Vote"
AndrewSchmidt-2732 asked FayWang-MSFT commented

How to connect to Full Trust COM server from UWP App?

I have a UWP app that uses the FullTrustProcessLauncher to start a full trust process that registers a COM object. However, when the UWP app tries to create the registered COM object CoCreateInstance returns REGDB_E_CLASSNOTREG. The COM server is registered in the package manifest though the extension windows.comServer. I can successfully create the COM object in unpackaged Win32 process.

How do I properly set up and register my full trust COM server so that my UWP app can create the COM object?

According to
there is a way to perform inter-pocess communication between UWP apps and Win32 apps with out of process COM servers.

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, about the use of COM Server in Desktop-Bridge, this document explains in detail. If this does not solve your problem, you can try to provide a minimal runnable demo so that we can analyze the problem.

0 Votes 0 ·

The document you linked to only covers Win32 app to Win32 app COM connection. All the processes in that document are executing at an integrity level of medium. It does not cover the case of a UWP App in an AppContainer with low integrity level creating a COM object from a Win32 App with a medium integrity level.

The web site won't let me attach a ZIP file with the Visual Studio solution files. How can I get you the code for my minimal running demo?

0 Votes 0 ·

Hi, If you are developing a Native UWP application, unfortunately, due to the design of UWP itself, you cannot access COM at will. In the win32 application, COM access has a relatively mature solution, you can consider creating a win32 application, and convert it to a UWP application through desktop-bridge.

In UWP, you can refer to this document Consume COM components with C ++ / WinRT to communicate with COM components by establishing runtime components. If you want to provide a sample, you can consider uploading it to Github or OneDrive. And do not include any private information.

0 Votes 0 ·
Show more comments

Hi, I'm not sure what caused REGDB_E_CLASSNOTREG error, I will confirm with the team.

0 Votes 0 ·

May I know why are you trying to implement this? What is your real scenario of your issue? Can you show more details about these? In addition, about performing interprocess communication between uwp applications and Win32 applications, App services is also a good choice, maybe you could try this to achieve the communication.

0 Votes 0 ·

We need to use the FullTrustProcess launcher to launch a process that can use IX509SCEPEnrollment to create a certificate in the User Certificate Store, and then install a wireless network profile using that certificate in EAP-TLS authentication. Here was can use App Services.

However, we also have upcoming projects that will need to have an AppContainer low-integrity process communication with IPC to non-packaged regular Win32 processes, including services. App Services will not work in this case. COM is a great because IDL will generate the code for proxy/stub DLLs for the RPC serialization (interface marshalling). We will have to use named pipes, and use a 3rd party library to serialize.

The primary motivators for using AppContainer processes is that we can use XAML to create the graphical user interfaces. XAML and C++/WinRT is the easiest way to create GUIs in C++. Developing a robust and general IPC method to communicate with regular Win32 processes.

0 Votes 0 ·

OK, I will comfirm with the team, if there is any progress, I will update here.

0 Votes 0 ·

0 Answers