PopBlockSessionSwitch

VOID __stdcall PopBlockSessionSwitch(UINT8 Start, UINT64 *Console){
  UINT64 SessionId; 
  _WIN32_POWERSTATE_PARAMETERS Parms; 

  memset(&Parms, 0, sizeof(Parms));
  Parms.MinSystemState = PowerSystemWorking;
  if( Start )
  {
    *(_DWORD *)Console = PoBlockConsoleSwitch(&Parms);
  }
  else
  {
    LODWORD(SessionId) = *(_DWORD *)Console;
    Parms.PowerStateTask = PowerState_UnBlockSessionSwitch;
    PopDispatchStateCallout(&Parms, &SessionId);
  }
}

Referenced by:

PoSessionBuiltinPanelState
PoSessionEngagementUpdate
PoSessionPowerControl
PopPowerAggregatorNotifyCsStateExited
PopScreenOff
PopScreenOn