第三方应用程序的空闲会话到期

发布于 2024-09-04 12:32:00 字数 640 浏览 2 评论 0原文

我们正在运行第三方应用程序。当闲置 20 分钟时,它会显示登录对话框。我们需要阻止应用程序显示登录屏幕。

我们不知道该应用程序内部如何处理空闲状态。

我们已经完成了以下操作,但没有成功。

  1. 在 C# 中创建了一个小型应用程序,每 5 分钟后聚焦一次(使用 SetForegroundWindow())并发送 BM_CLICK 消息发送到其子窗口之一。不起作用。
  2. 每 5 分钟后聚焦一次(使用 SetForegroundWindow()) 并将光标移动几个像素,然后将光标恢复到之前的位置。这也行不通啊!

还有其他方法可以实现目标吗?

We have a third party application running. It shows login dialog when idle for 20 minutes. We need to prevent the application to display login screen.

We do not have any idea how idle state is handled internally in that application.

We have done the follwoing with no luck.

  1. Created an small application in c# which focus it after every 5 minutes (using SetForegroundWindow()) and send a BM_CLICK message to one of its child window. Does not work.
  2. focus it after every 5 minutes (using SetForegroundWindow()) and move the cursor few pixels then restore cursor at its previous position. This does not work too!

Is there any other way to achieve the goal?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海夜未眠 2024-09-11 12:32:00

如果第三方应用程序使用 GetLastInputInfo 函数检测到空闲状态,您可以尝试 SendInput 重置空闲状态。找到一些不影响正常程序执行的输入事件,例如鼠标移动到 1 甚至 0 像素。

If third-party application detects idle state using GetLastInputInfo function, you can try SendInput to reset an idle state. Find some input event that doesn't affect normal program execution, like mouse movement to 1 or even 0 pixels.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文