SetWindowsHookEx under Windows Service
-
Is it possible for a service under windows XP to hook for example mouse or keyboard? I have tried to call SetWindowsHookEx inside a windows service but the callback function receives no messages. If yes how can it be done. I know already about desktop interactive option for a service and SetTheadDesktop etc but none of them work. I also tried impersonation, to give the hooking thread a specific process token no luck there too. Thanx
-
Is it possible for a service under windows XP to hook for example mouse or keyboard? I have tried to call SetWindowsHookEx inside a windows service but the callback function receives no messages. If yes how can it be done. I know already about desktop interactive option for a service and SetTheadDesktop etc but none of them work. I also tried impersonation, to give the hooking thread a specific process token no luck there too. Thanx
I guess it will not work in the default
SYSTEM
account. Check it by running the service in another user context.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
I guess it will not work in the default
SYSTEM
account. Check it by running the service in another user context.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Is it possible for a service under windows XP to hook for example mouse or keyboard? I have tried to call SetWindowsHookEx inside a windows service but the callback function receives no messages. If yes how can it be done. I know already about desktop interactive option for a service and SetTheadDesktop etc but none of them work. I also tried impersonation, to give the hooking thread a specific process token no luck there too. Thanx