I just wrote a program in C# that does that. There's a lot of code out
there for this particular function in VB6 and VB.NET/C#.NET. Just do a
search for source code using the WTS API (WTSAPI32.DLL). The main functions
you're looking for are WTSEnumerateServers() and WTSEnumerateSessions().
Check out this MS KB article to start: http://support.microsoft.com/default.aspx?scid=KB;[LN];Q291789.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.