I have a windows service that needs to perform some actions on "user activity" (mouse move, keyboard clicks) and on "user inactivity" (no mouse move / keyboard clicks for some time). Since service is in different session and computer can be locked / no user logged in, i can't use hooks, GetLastInputInfo()
, GetAsyncKeyState()
etc. Where are lots of advanced methods to interact with sessions from service, but maybe it's some easy solut开发者_JS百科ion exists that i can code fast in C / C++?
Ok, just for the record: I have implemented this via starting process in each session manually. Lots of code :(. But works :).
精彩评论