This isn't a task manager clone, but it does show all the information from the Processes window (well, process id, session id, user id, process name). I didn't actually code 90% of this so please don't vote for it, I just added the username lookup routine.. This code is from microsoft's msdn collection which i stumbled on in my journies. The main benifit of this to me is to enumerate the users currently logged on to a Windows 2000/XP machine. And specificly to find the active username if you are logged on as a service.. but that's another story. (ps I don't use this to find that out but this is what I found while looking for that)..
Code is not to complex, apart from a few pointers.
Assumes
Requires Windows 2000/XP.. Will not work in Win98 as it is not a terminal service operating system.