SetThreadExecutionState controls the request for uninterrupted service for
the thread in which the call occurs. My problem is that I want to be able
to be able to override the use of ES_SYSTEM_REQUIRED by any application in
the machine.
The problem is occurring with computers that are located in meeting rooms.
We're using the WINEXIT screensaver to provide a deadman timer; killing
the user's session after a relatively short idle time reduces the security
exposure created if someone logs on to use the computer, then leaves the
room without logging off. The sticking point is that some applications
that are frequently used in meetings (PowerPoint is the poster child)
disable the system idle timer. What I would like to find is an API
through which I can do <something> to prevent any application from
defeating the screensaver timer. I would prefer to do it using a
published API but might consider (reluctantly, and only if necessary)
front-ending the API and quietly ignoring the call.
Yes, I know this isn't a programming NG but I was hoping that someone had
a magic answer for me. Thanks anyway for taking time to respond!
Joe
Enables applications to inform the system that it is in use, thereby
preventing the system from entering the sleeping power state or turning
off the display while the application is running.
EXECUTION_STATE SetThreadExecutionState(
EXECUTION_STATE esFlags
);
[...]
ES_SYSTEM_REQUIRED
0x00000001 Forces the system to be in the working state by resetting the
system idle timer. [...]
Joe Morris said:
<.> wrote:
Applications can mark their threads as not idle. This is how Media
Player disables the screensaver while playing video.
Can you point me to some Microsoft documentation on the ability of a
program to defeat the screensaver timeout? I've been chasing a problem
for which that sounds like the explanation for some time (involving
unattended systems not going into screenlock), and getting nothing
useful from Microsoft.
Is it possible to have a (privileged, of course) program scan the active
user-context threads and turn off the "force not-idle" setting?