Click to See Complete Forum and Search --> : keybd_event() not working within an NT service
Jorge
07-24-2002, 05:45 AM
Dear all,
I made a program where I'm using the keybd_event() routine with success,
I mean - this routine is working very well.
Now I'm trying to use the same routine in an WindowsNT service, and
I don't know why, but it doesn't work at all.
Platform: Windows NT 4.0 workstation, SP6a, MS Visual C++ 6.0.
Can anyone help me ?
Thanks in advance
Jorge
ralph
07-24-2002, 08:01 AM
"Jorge" <nc35031a@netc.pt> wrote:
>
>Dear all,
>I made a program where I'm using the keybd_event() routine with success,
>I mean - this routine is working very well.
>Now I'm trying to use the same routine in an WindowsNT service, and
>I don't know why, but it doesn't work at all.
>Platform: Windows NT 4.0 workstation, SP6a, MS Visual C++ 6.0.
>
>Can anyone help me ?
>Thanks in advance
>Jorge
>
A Windows NT service doesn't have a 'desktop'.
You will have to go lower if you want a Services to trap 'all' keystrokes'.
Jorge
07-24-2002, 11:01 AM
"ralph" <nt_consulting32@hotmail.com> wrote:
>
>"Jorge" <nc35031a@netc.pt> wrote:
>>
>>Dear all,
>>I made a program where I'm using the keybd_event() routine with success,
>>I mean - this routine is working very well.
>>Now I'm trying to use the same routine in an WindowsNT service, and
>>I don't know why, but it doesn't work at all.
>>Platform: Windows NT 4.0 workstation, SP6a, MS Visual C++ 6.0.
>>
>>Can anyone help me ?
>>Thanks in advance
>>Jorge
>>
>
>A Windows NT service doesn't have a 'desktop'.
>
>You will have to go lower if you want a Services to trap 'all' keystrokes'.
>
>
Dear Ralph,
What I really want is to put keystrokes into the windows
keyboard buffer. Is there any other routine to do it under
an NT service ?
Kind regards
Jorge
ralph
07-24-2002, 12:58 PM
"Jorge" <nc35031a@netc.pt> wrote:
>
>"ralph" <nt_consulting32@hotmail.com> wrote:
>>
>>"Jorge" <nc35031a@netc.pt> wrote:
>>>
>>>Dear all,
>>>I made a program where I'm using the keybd_event() routine with success,
>>>I mean - this routine is working very well.
>>>Now I'm trying to use the same routine in an WindowsNT service, and
>>>I don't know why, but it doesn't work at all.
>>>Platform: Windows NT 4.0 workstation, SP6a, MS Visual C++ 6.0.
>>>
>>>Can anyone help me ?
>>>Thanks in advance
>>>Jorge
>>>
>>
>>A Windows NT service doesn't have a 'desktop'.
>>
>>You will have to go lower if you want a Services to trap 'all' keystrokes'.
>>
>>
>Dear Ralph,
>What I really want is to put keystrokes into the windows
>keyboard buffer. Is there any other routine to do it under
>an NT service ?
>
>Kind regards
>Jorge
Jorge,
I know it can be done as witnessed by all the card-readers, alternative input
devices, and other toys out there, but I haven't ever written one myself.
If you haven't yet, I suggestion you download the DDK from M$. There may
be some clues in their sample code. I would also check the M$ public DDK
newsgrp - they can surely direct you to some source.
One of the problems is that NT, just like Unix, has several security holes
related to buffer overflows. So while the code is not secret - it isn't exactly
displayed on the front counter, if you know what I mean.
devx.com
Copyright Internet.com Inc. All Rights Reserved