Call SetThreadExecutionState in Event-Handling Applications

[This is preliminary documentation and subject to change.]

Best Practice   (Designed for Microsoft® Windows® Logo)

Event handling applications such as phone answering machine applications, fax servers, and periodic maintenance or desktop management applications should call SetThreadExecutionState before and after handling each event.

Remarks

This best practice allows the operating system to keep the computer awake while the event is being handled and then put the computer to sleep immediately thereafter.

See Also

For a description of pretesting you can do to ensure that your application provides proper ACPI/OnNow support, see Pretesting ACPI/OnNow support.

For more information about the OnNow initiative and for OnNow technical specifications, see http://www.microsoft.com/hwdev/onnow.htm.