Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework
Re: allow service to interact with desktop - vista and managed code
Mezga Geza
12/21/2010 1:00:00 PM
This method works also in Vista:
http://it.expertmonster.com/question/Allow-service-to-interact-with-deskto...
> On Tuesday, December 04, 2007 2:11 AM almir wrote:
> Hi,
>
>
>
> under Vista it is not possible to interact with users-desktop msdn
> suggests using CreateProcessAsUser and I found a partial
> implementation of this method in managed code here
>
http://odetocode.com/Blogs/scott/archive/2004/10/2...
however
> i do not know how to obtain token of a user which is currently loged
> in which means that I have a problem in this line
> IntPtr hToken = WindowsIdentity.GetCurrent().Token; //here i get a
> service token and I need user token so that i can start application in
> its context, what is the right way to do it ?
>
>
> do you know any other implementation which enables me to start
> application so that it is visible by user?
>
> thanks
> almir
>> On Tuesday, December 04, 2007 2:11 AM Michael Nemtsev [MVP] wrote:
>> Hello almir,
>>
>> Why do u need to allow service interact with desktop?
>> And what does "application so that it is visible by user" mean?
>>
>> As I understand u need to provide the general service without UI, but use
>> any IPC (interprocess communication) to talk to you separate UI application
>>
>> ---
>> WBR,
>> Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.c...
>>
>> "The greatest danger for most of us is not that our aim is too high and we
>> miss it, but that it is too low and we reach it" (c) Michelangelo
>>
>>
>> a> Hi,
>> a>
>> a> under Vista it is not possible to interact with users-desktop msdn
>> a> suggests using CreateProcessAsUser and I found a partial
>> a> implementation of this method in managed code here
>> a>
http://odetocode.com/Blogs/scott/archive/2004/10/2...
however
>> a> i do not know how to obtain token of a user which is currently loged
>> a> in which means that I have a problem in this line
>> a> IntPtr hToken = WindowsIdentity.GetCurrent().Token; //here i get a
>> a> service token and I need user token so that i can start application
>> a> in
>> a> its context, what is the right way to do it ?
>> a> do you know any other implementation which enables me to start
>> a> application so that it is visible by user?
>> a>
>> a> thanks
>> a> almir
>>> On Friday, December 07, 2007 1:09 AM almir wrote:
>>> yes,
>>> the problem is however starting application in user context, so that
>>> he can see it
>>> Submitted via EggHeadCafe
>>> Oracle Developer For Beginners
>>>
http://www.eggheadcafe.com/training-topic-area/Oracle-SQL-Developer/2/Oracle-SQL-Sa...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: allow service to interact with desktop - vista and managed code
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password