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

Posted by JS Bangs on Stack Overflow See other posts from Stack Overflow or by JS Bangs
Published on 2010-03-24T17:31:48Z Indexed on 2010/03/24 17:33 UTC
Read the original article Hit count: 316

Filed under:
|
|
|
|

We have a program which launches a child process that hosts a local COM server, which for various reasons must be launched elevated. Everything works fine so long as both the parent and the child process are elevated.

However, we also want to run when the parent process is non-elevated. Launching the child process results in a UAC dialog (which is acceptable), and the child appears to start correctly and successfully calls CoRegisterClassObject. However, the parent process gets REGDB_E_CLASSNOTREG when calling CoCreateInstance with the same CLSID.

I assume this is some sort of permissions issue. How can I register my class in the elevated server to allow it to be called from a non-elevated process.

© Stack Overflow or respective owner

Related posts about com

Related posts about elevation