Re: Windows Service - Fast User Switching - Find Active Desktop Problem
From: Peter Boulton (news_at_Data*n0-spam*Perceptions.co.uk)
Date: 04/18/05
- Next message: Doug: "Code Signing Clarification"
- Previous message: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- In reply to: Eduardo Francos: "Re: Windows Service - Fast User Switching - Find Active Desktop Problem"
- Next in thread: Eduardo Francos: "Re: Windows Service - Fast User Switching - Find Active Desktop Problem"
- Reply: Eduardo Francos: "Re: Windows Service - Fast User Switching - Find Active Desktop Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 18 Apr 2005 14:14:03 +0100
Eduardo Francos wrote on 18/04/2005 07:12:
> Peter Boulton wrote:
>
>> Hi,
>>
>> I am writing a Windows Service, which is allowed to interact with the
>> desktop. (I realise that this is not recommended, but it is currently
>> a constraint.) It needs to post advice windows on the desktop of
>> whoever is logged in. With fast user switching this could be any one
>> of any number of concurrent sessions. My service needs to post the
>> windows to the active session, so that the active user can interact
>> with it.
<snipped>
>
>
> AFAIK services are always run in the console terminal session, Session
> 0. Addressing WinSta0 from a service will then always point to that
> session.
>
> Running a program within the security context of the user can be done
> simple by adding a UI client program in the Run key of HKLM or HKCU,
> then use whatever IPC scheme that suits your needs to communicate with
> the service.
> You may use the WTSRegisterSessionNotification related API group to know
> when user sessions are activated/deactivated so the service knows which
> client to notify. Alternatively the service can notify all connected
> clients and have the client UI decide whether to interact with its user
> or not.
>
> For further information you can refer to "How To Design a Service to
> Interact with Multiple User Sessions"
> http://support.microsoft.com/default.aspx?scid=kb;en-us;308403
>
> or "Fast User Switching: Issues for Assistive Technology Vendors"
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/accessibility.asp
>
>
>
>
> Eduardo
Thanks for the reply. So, are you saying what I want to do is
impossible? That is, launch a process in the currently logged on user's
context from my service, on the desktop of whoever has sent the ipc via
a named pipe to my service?
If so, how do I get this, given the named pipe handle from the calling
process?
Please be gentle with me - this stuff is very new to me! Code example
would be very much appreciated!
Thanks.
Pete
- Next message: Doug: "Code Signing Clarification"
- Previous message: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- In reply to: Eduardo Francos: "Re: Windows Service - Fast User Switching - Find Active Desktop Problem"
- Next in thread: Eduardo Francos: "Re: Windows Service - Fast User Switching - Find Active Desktop Problem"
- Reply: Eduardo Francos: "Re: Windows Service - Fast User Switching - Find Active Desktop Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|