Форум: "Система";
Текущий архив: 2004.02.25;
Скачать: [xml.tar.bz2];
ВнизКак отследить включение режима пониценного энергопотребеления? Найти похожие ветки
← →
andruxa (2003-12-03 16:00) [0]Поподробней пожалуйста.
← →
me (2003-12-03 16:33) [1]MSDN, Platform SDK: Hardware
Using Power Management
To ensure that your application runs well, it must monitor power messages. The system initiates a sleep request by sending a PBT_APMQUERYSUSPEND event. Your application must respond to this request as follows:
1.If the application is not busy and does not have unsaved data on a network device, it must ensure that all outgoing operations are completed.
2.If the application has unsaved data on a network location, it must deny the sleep request by returning BROADCAST_QUERY_DENY and prepare to go to a sleep state.
3.If the application is busy, it must either return BROADCAST_QUERY_DENY or wait until the operation causing the busy status is finished, and then prepare to go to a sleep state.
After all applications have accepted the sleep request, the system sends a PBT_APMSUSPEND event. In response, your application must allow the hardware to completely power down by taking the following actions:
1.Save all data to local non-volatile storage. Write user data to temporary storage when the user has not requested that the original file be overwritten.
2.Closing all open files, including network files.
3.Pause sound.
4.Restore modified drivers to their original state
In some circumstances, the sleep request can be canceled. If this occurs, the system sends a PBT_APMQUERYSUSPENDFAILED event. In this case, the application should restore its data to a working state and continue operation.
Страницы: 1 вся ветка
Форум: "Система";
Текущий архив: 2004.02.25;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.032 c