Connect to an elevated COM server from a non-elevated process

We have a program that launches a child process, which hosts a local COM server, which for various reasons must be run elevated. Everything is working fine, while both the parent and the child process have been upgraded.

However, we also want to start when the parent process is not promoted. Starting a child process leads to a UAC dialog (which is acceptable), and the child starts to start correctly and successfully CoRegisterClassObject. However, the parent process receives REGDB_E_CLASSNOTREG when called CoCreateInstancewith the same CLSID.

I guess this is some kind of permissions issue. How can I register my class on an elevated server so that it can be called from a process without an elevation?

+3
source share
2 answers

Read COM Elevation Moniker for several ways to access a server with a high level of delay.

+2
source

COM marshalling firewalls are subject to Vista UIPI . I suggest you use some other communication methods, such as a named pipe with a modified ACL , sockets / WCF / Remoting with private protocols, etc. to access an unprivileged user.

+1
source

Source: https://habr.com/ru/post/1738373/


All Articles