Thumbeti
Thumbeti

Reputation:

Passing user context to from impersonated thread to outproc COM object

I am writing a CPP program on windows 2k3 where i want to achieve the following thing.

Pass the user context from the impersonated thread to a outproc COM component.

Steps what i m trying in details are: 1) Start an execution of exe with user USR1 2) Impersonate the current thread with USR2 3) Initiate a API on outproc COM object. And this COM object should run with USR2

What is happening: on 3rd step, COM object is getting started with USR1 only.

Can anybody help me in passing the user context to COM object.

Thanks in advance, Thumbeti

Upvotes: 0

Views: 235

Answers (1)

Johannes Passing
Johannes Passing

Reputation: 2805

To have the server impersonate USR2, you have to use cloaking. To enable cloaking, you either have to call CoInitializeSecurity or CoSetProxyBlanket.

Upvotes: 2

Related Questions