tags:

views:

70

answers:

2

Hi,

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

A: 

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

Johannes Passing
A: 

Hi Johannes,

Thanks a lot your immediate response. using CoInitializeSecurity call solved my problem.

Thanks a ton, Sivaram