I am re-writing a completed program as an NT Service. It is a 'simple' client which enables/disables the keyboard, by using a keyboard hook in a DLL, and controlled by a server (another program).

Everything seems to work all right as a Service, but the keyboard is still enabled - ie the keyboard disabling hook (in the DLL) does not disable the keyboard.
The calls to the functions in the DLL do not return error status (i output their status to a file).

I recompiled the service module as a console and it works perfectly.

Before I lose more hair on this project, I would like to know if anyone has attempted to do something similar. I referenced Iczelion's Hook, and Cynical Pinnacle's NT Services tutorials.
Posted on 2002-12-25 21:08:30 by b33ts