问题
What is the Win32 api function that prevents the system from going into standby?
Some programs use it, which is pretty annoying in my opinion.
I know there's a couple of WM_SYSCOMMAND messages you can trap to prevent the screensaver from coming on..
回答1:
SetThreadExecutionState. There's no Get and it doesn't take a thread handle. Done.
来源:https://stackoverflow.com/questions/2687867/win32-api-prevent-standby