Windows 服务 - 查明上次用户操作的时间
我用 Java 编写了一个应用程序,其目的是记录上次发生的任何用户操作。
当运行这个登录的应用程序时,它工作得很好。但是当我将它作为 Windows 服务运行时,它不起作用,因为据我了解,它只捕获 Session0 上的最后一个用户操作。
我希望我的应用程序能够获取所有登录用户的最后一个用户输入,即使没有用户登录。因此,如果我在注销时移动鼠标或按下某个键,它将计入最后一个用户操作。如果有人登录计算机,移动鼠标或按下按键,这也算在内。
我目前正在使用此处描述的涉及使用 JNA 的方法。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论