none
Could I log mouse/keyboard input by using Windows Hook in Windows Service? RRS feed

  • Question

  • Hi there,

    I would like to monitor my mouse / keyboard input with SYSTEM privilege.
    So I would like to use Windows Service to implement this feature.
    Could I log mouse/keyboard input by using Windows Hook in Windows Service?
    Thanks.

    Best regards,
    Hank

    Hank

    Tuesday, June 25, 2019 9:40 AM

Answers

  • nope. The docs of SetWindowsHookEx says ".... or with all threads in the same desktop as the calling thread".

    Application and services are on different desktops. You cannot hook across desktop boundary. 



    Visual C++ MVP

    Tuesday, June 25, 2019 4:37 PM

All replies