How to get SessionId in kernel mode?

If not, what the simpliest API in user mode?

Thanks.

Why do you want to get SessionID? What bigger problem you’re trying to solve?

IoGetRequestorSessionId will do it if you have an IRP.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@gmail.com” wrote in message
news:xxxxx@ntdev:

> If not, what the simpliest API in user mode?
>
> Thanks.