My application is running as service under Windows Server 2008. I'm looking for a way to detect an active console session. This can either be the console or a RDP session started as administrative session ("mstsc /admin").
The console session is called "Console" but I'm lost with RDP sessions. Under Windows 2003 it was easy because a console session was always running with id 0. This changed since Vista so I'm looking for another way to find out.
I've already checked the WTSxxx Win32 API but have not found what I'm looking for.
Can anybody help?