impersonate in vc++ .net

  • Thread starter Thread starter José Achig
  • Start date Start date
J

José Achig

Hi all,

I have written a windows service in vc++ .net with "SystemAccount" rights
and I want to get access to the user's desktop so I have heard that I have
to impersonate the user when it login.

How I can impersonate the user?

Thanks
 
José Achig said:
I have written a windows service in vc++ .net with "SystemAccount" rights
and I want to get access to the user's desktop so I have heard that I have
to impersonate the user when it login.

How I can impersonate the user?

A thread running in the context of the user needs to make a request of the
service via an impersonable interprocess communication mechanism - e.g.
named pipes, DDE, RPC etc. Check the docs for ImpersonateNamedPipeClient(),
DdeImpersonateClient(), RpcImpersonateClient().

There is much more to impersonation than can be reasonably discussed in a
news group post. Take a look at this link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/cli
ent_impersonation.asp

or check a good book like Jeffrey Richter's "Programming Server Side
Applications for Microsoft Windows 2000".

Regards,
Will
 
No impersonate won't help here, you have to set "Interact with the desktop"
property of the service.

Willy.
 
Back
Top