cvmilitaru
asked on
About hooks and NT services.
How can I install a keyboard hook in a NT service?
ok, i seem to be way off. you can implement a keyboard hook in NT. =) What are you having troubles with? I have code to install the hook...
~Aaron
~Aaron
u can find this code in online MSDN .
search for win32 hooks and will reach the sample code for the same .
save those files and run the sample .
i have tried it ..it works fine .
regards
search for win32 hooks and will reach the sample code for the same .
save those files and run the sample .
i have tried it ..it works fine .
regards
ASKER
For BudWeezer and Aggarwal:
I have already done a keyboard proc in a dll for installing in the hook chain. If I load it from a normal application, it works.
When I try to load my function from a NT service all seems to be ok, there is none error messege, but the hooks doesn't work.
My questions is what is happen ?
Why the function doesn't work, even if I dont't receive any error messege?
Regards
I have already done a keyboard proc in a dll for installing in the hook chain. If I load it from a normal application, it works.
When I try to load my function from a NT service all seems to be ok, there is none error messege, but the hooks doesn't work.
My questions is what is happen ?
Why the function doesn't work, even if I dont't receive any error messege?
Regards
can u please post the code !!!
part of it could be with my earlier statement of apps running the hook at the same time. When you debug it, does the hook even get initialized? Post code por favor. =)
~Aaron
~Aaron
NT Services allow you to interact from the desktop; set the service's profile to Allow Interaction with the Desktop. There is one problem, though, if you allow desktop interaction, you cannot access the network from the service. One or the other, you choose.
ASKER
syscyk, your comment is OK. Send it as an answer. And thanks.
cvmilitaru
cvmilitaru
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello, is anyone out there! I also have run into some problems in NT with the WH_GETMESSAGE hook. It allows me to look at the message, but I cannot modify it like you normally can outside of NT. Even more puzzling than that, it only seems to happen when hooking MSWord. Points being offerred!!
This question was awarded, but never cleared due to the JSP-500 errors of that time. It was "stuck" against userID -1 versus the intended expert whom you awarded. This corrects that and the expert will now receive these points, all verified.
Moondancer
Moderator @ Experts Exchange
Moondancer
Moderator @ Experts Exchange
~Aaron