|
Power Management Events
A power management event is a change in either the system power status or the
operational mode of a device or the computer. Because these events can affect
the operation of applications and installable drivers and can lead to loss of
data, Windows notifies all applications and installable drivers by broadcasting a WM_POWERBROADCAST message for each event.
A system power status event occurs when there is a change in the power supply
or in the system battery status. For example, the system broadcasts a message
whenever the user switches from battery to AC power or vice versa. The system
also broadcasts a message when remaining battery power slips below 10%.
An operational mode event occurs when there is a change in power consumption,
such as the system shutting itself down or the user turning the system back on.
Some changes in operational mode can cause loss of data if applications and
drivers do not prepare for them. Therefore, the system broadcasts messages about
these changes before they actually occur. For example, if the system determines
that it is idle, it broadcasts a message notifying applications and drivers
that it is about to suspend operation and shut itself down to save power. The
applications and drivers can prepare for this suspension by closing files and
saving data that may otherwise be lost when power is shut off.
The system has two ways to shut itself down. It can suspend operation or
carry out critical suspension. An application can also shut the system down by
using the SetSystemPowerState function to suspend operation.
When system operation is suspended, power to all devices is lost. The WM_POWERBROADCAST messages, sent immediately before suspension, allow device drivers to save
the state of the device. For many devices (but not all), saving the state means
the driver can restore the state when power is eventually restored, allowing the
device to continue operation as if power was never lost.
When the system carries out a critical suspension, battery power is too low to
let the computer continue to run. Unlike for suspended operation, the system
does not notify applications and drivers before carrying out a critical
suspension. This means data may be lost.
When system operation is restored after having been suspended, the system
notifies all applications and drivers. It also identifies how the system was
previously shut down so that the application or driver can take appropriate steps to
restore its data and continue its own operation.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|