Справочник функций

Ваш аккаунт

Войти через: 
Забыли пароль?
Регистрация
Информацию о новых материалах можно получать и без регистрации:

Почтовая рассылка

Подписчиков: -1
Последний выпуск: 19.06.2015

SetSystemPowerState

280
05 марта 2006 года
ВуД™
326 / / 04.01.2006
Подробно Про финкцию для чего и т.д:
Private Declare Function SetSystemPowerState Lib "kernel32" _
(ByVal fSuspend As Long, ByVal fForce As Long) As Long
8.4K
05 марта 2006 года
Dian
91 / / 18.02.2006
Цитата:
Originally posted by ВуД
Подробно Про финкцию


В MSDN

534
05 марта 2006 года
HarryAxe
448 / / 19.01.2006
Цитата:
Originally posted by ВуД
Подробно Про финкцию для чего и т.д:
Private Declare Function SetSystemPowerState Lib "kernel32" _
(ByVal fSuspend As Long, ByVal fForce As Long) As Long

Вот цитата из MSDN. Переводить будешь сам.

Цитата:
The SetSystemPowerState function suspends the system by shutting power down. Depending on the ForceFlag parameter, the function either suspends operation immediately or requests permission from all applications and device drivers before doing so.

The calling process must have the [COLOR=blue]SE_SHUTDOWN_NAME[/COLOR] privilege. To enable the [COLOR=blue]SE_SHUTDOWN_NAME[/COLOR] privilege, use the AdjustTokenPrivileges function

BOOL SetSystemPowerState(BOOL fSuspend, BOOL fForce);

Parameters
fSuspend
Windows NT/2000/XP: [in] Specifies the state of the system. If TRUE, the system is suspended. If FALSE, the system hibernates.
Windows 95/98/Me: Ignored.

fForce
[in] Forced suspension. If TRUE, the function broadcasts a PBT_APMSUSPEND event to each application and driver, then immediately suspends operation. If FALSE, the function broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation.

Return Values
If power has been suspended and subsequently restored, the return value is nonzero.

If the system was not suspended, the return value is zero. To get extended error information, call GetLastError.

Remarks
If any application or driver denies permission to suspend operation, the function broadcasts a PBT_APMQUERYSUSPENDFAILED event to each application and driver. If power is suspended, this function returns only after system operation is resumes and related WM_POWERBROADCAST messages have been broadcast to all applications and drivers.

This function is similar to the SetSuspendState function.


Короче, спать ложит комп

Реклама на сайте | Обмен ссылками | Ссылки | Экспорт (RSS) | Контакты
Добавить статью | Добавить исходник | Добавить хостинг-провайдера | Добавить сайт в каталог