Re: NT service and simulated Keystroke
- From: "Arnaud Debaene" <adebaene@xxxxxxxxxxxxxxxx>
- Date: Thu, 3 Nov 2005 22:47:31 +0100
Craig Kelly wrote:
> <khuedinhpham@xxxxxxxxx> wrote:
>
>> Now I just wonder if is there anything similar to that when I call a
>> keypress simulation ? Since keypress is interpreted by Service as an
>> user interaction. Then there may be something must be called before
>> calling other API's, etc. I don't know what it is and hope that
>> someone did this before can give me a helping hand.
>
> I believe your service must be configured to "Interact With Desktop".
.... and it shouldn't, since it is a serious security hole that won't be
available on Vista (google for "shatter attack" if you want the details).
For Khue : As you have said it yourself, a service is not intended to have
any user interface, and you shouldn't try to put it one.
Suppose your service is running on a Terminal Server box, with 10 users
logged in : what would you do? Log the 10 keyboards simultanously? Same
question about the LED thingy...
If your service need to interact with the user one way or another, you
should write a GUI app that is started when a user log in (put it in the
startup folder, or in the registry ...). That app should communicate with
the service through some kind of IPC (socket, COM, Event, Memory Mapped
File, whatever you like).
Arnaud
MVP - VC
.
- Follow-Ups:
- Re: NT service and simulated Keystroke
- From: Lawrence Groves
- Re: NT service and simulated Keystroke
- References:
- NT service and simulated Keystroke
- From: khuedinhpham
- Re: NT service and simulated Keystroke
- From: Craig Kelly
- NT service and simulated Keystroke
- Prev by Date: Why DevMode structure is NULL on Terminal Server ?
- Next by Date: Re: Casting int to pointer in x64
- Previous by thread: Re: NT service and simulated Keystroke
- Next by thread: Re: NT service and simulated Keystroke
- Index(es):