SetSystemPowerState( NULL , POWER_STATE_RESET , POWER_FORCE ) ;
这个函数可以让机器reset
而在backlight 熄灭后的唤起则可用下面的函数
关于Suspend后也可以用此方法叫起~
void CAutoBackupApp::API_SetPowerStatus(BOOL fBacklightOn)
{
// the name of the backlight device
TCHAR tszBacklightName[] = TEXT("BKL1:");
static HANDLE s_hBacklightReq = NULL;
if (fBacklightOn)
{
if (NULL == s_hBacklightReq)
{
// Set the requirement that the backlight device must remain
// in device state D0 (full power)
s_hBacklightReq = SetPowerRequirement(tszBacklightName, D0,
POWER_NAME, NULL, 0);
if (!s_hBacklightReq)
{
RETAILMSG(1, (L"SetPowerRequirement failed: %X/n",
GetLastError()));
}
}
}
else
{
if (s_hBacklightReq)
{
//释放Requirement
if (ERROR_SUCCESS != ReleasePowerRequirement(s_hBacklightReq))
{
RETAILMSG(1, (L"ReleasePowerRequirement failed: %X/n",
GetLastError()));
}
s_hBacklightReq = NULL;
}
}
}