Windows Service - Find out when the last user action was [closed]

删除回忆录丶 提交于 2019-12-12 16:16:25

问题


I wrote an application in Java and it's purpose is to log the last time any user action has taken place.

When running this application logged in it works perfectly. But when I running it as a Windows Service it doesn't work because, from what I understand, it only captures the last user actions on Session0.

I want my application to get the last user input over all users logged in and even when no user is logged in. So if I move the mouse or press a key when logged out it will count towards the last user action. And if anyone is logged into the computer moves the mouse or presses a key this will count also.

I am currently using the approach described here that involves using JNA.

来源:https://stackoverflow.com/questions/9220133/windows-service-find-out-when-the-last-user-action-was

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!