NTSTATUS
PopDispatchStateCallout(
  IN  PKWIN32_POWERSTATE_PARAMETERS Parms,
  IN  PULONG SessionId  OPTIONAL
  );

Routine Description:

    Dispatches a session state callout to PopStateCallout

Arguments:

    Parms     - Supplies the parameters

    SessionId - Optionally, supplies the specific session the callout should be
                dispatched to.  If not present, the callout will be dispatched
                to all sessions.

Return Value:

    NTSTATUS code.

Note:

    For compatibility reasons, the previous behavior of MmDispatchSessionCallout
    only returning the status of the callout to session 0 has been maintained.