PopGetSessionId

UINT64 __stdcall PopGetSessionId(){
  UINT64 result; 

  LODWORD(result) = PsGetProcessSessionIdEx((INT64)KeGetCurrentThread()->ApcState.Process);
  return result;
}

Referenced by:

PopPowerSourceChangeCallback