下面是pNewPowerState->EnterState的具体内容
pNewPowerState->EnterState
{
PmSetSystemPowerState_I(GetStateString(),0 ,0, TRUE);
{
if (((!_tcsicmp(szStateName,_T("suspend"))) || (dwStateHint==POWER_STATE_OFF)) &&(fInternal==TRUE))
{
//将用户关闭系统的消息写入周日志里面
PMSQM_Set(PMSQM_DATAID_POWER_USER_SHUTDOWNS,1);
}
PlatformSetSystemPowerState
{
PmUpdateSystemPowerStatesIfChanged
RegReadSystemPowerState
//将PBT_TRANSITION消息发送给所有注册了相应电源管理通知事件的驱动
pbb.Message = PBT_TRANSITION;
pbb.Flags = pNewSystemPowerState->dwFlags;
pbb.Length = _tcslen(pNewSystemPowerState->pszName) + 1;