How to check if a Windows executable is running in a Session 0 process?

1.7k Views Asked by At

I am running into http://msdn.microsoft.com/en-us/library/windows/desktop/hh404562(v=vs.85).aspx#use_direct3d_in_session_0_processes.

I use a few of the processes documented, and I am running into HRESULT values that suggest my executable is, in fact, running under Session 0.

How can I programmatically deduce if I am running under Session 0? I would rather gracefully exit than drop out with a mysterious error code.

1

There are 1 best solutions below

0
On BEST ANSWER