开发者

windows standby

开发者 https://www.devze.com 2023-01-28 01:31 出处:网络
I have an app whose job it is to process data coming from a com port at either 2 or 60 second intervals.Obviously, it doesn\'t make sense to have this app subject to standby.Three things occur to me 1

I have an app whose job it is to process data coming from a com port at either 2 or 60 second intervals. Obviously, it doesn't make sense to have this app subject to standby. Three things occur to me 1) tell windows periodically that things are happening that should delay standby 2) disable standby 3) detect开发者_Go百科 that standby is configured and warn the user. IMHO, (1) would make the most sense.

So what do such application usually do?

How do I go about doing it c++?


SetThreadExecutionState might help you -- specifically, the ES_SYSTEM_REQUIRED flag "Forces the system to be in the working state by resetting the system idle timer."


I believe this would be the correct answer --

Stop system entering 'standby'

0

精彩评论

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

关注公众号