开发者

Third party Application's Idle Session expiry

开发者 https://www.devze.com 2023-01-02 03:58 出处:网络
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 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号