IoGetContainerInformation
NTSTATUS __stdcall IoGetContainerInformation(
_IO_CONTAINER_INFORMATION_CLASS InformationClass,
VOID *ContainerObject,
VOID *Buffer,
UINT64 BufferLength){
VOID *SessionObjectById;
unsigned int CurrentProcessSessionId;
bool v8;
UINT64 SessionId;
SessionObjectById = ContainerObject;
if( InformationClass )
return -1073741585;
if( (unsigned int)BufferLength < 0xC )
return -1073741582;
if( !ContainerObject )
{
CurrentProcessSessionId = PsGetCurrentProcessSessionId();
SessionObjectById = MmGetSessionObjectById(CurrentProcessSessionId);
if( !SessionObjectById )
return -1073741584;
}
LODWORD(SessionId) = 0;
*((_DWORD *)Buffer + 1) = MmGetIoSessionState(SessionObjectById, &SessionId);
v8 = (_DWORD)SessionId == KUSER_SHARED_DATA.ActiveConsoleId;
*(_DWORD *)Buffer = SessionId;
*((_BYTE *)Buffer + 8) = v8;
return 0;
}Referenced by:
No references.