In Windows I would like the C++ command or reference that would get the "tasklist" in C++ and output it to a buffer?
+8
A:
Use EnumProcesses() to get the process identifiers, use OpenProcess() to get their handles and get the information you need via the usual process functions.
Georg Fritzsche
2010-02-03 02:59:48
+1
A:
There are two basic routes: PSAPI, and ToolHelp32. If you want to badly enough, you can also use the Native API. The Sysinernals Web site used to provide full source code to a process explorer utility that used the Native API to do its tricks. Then Microsoft bought out SysInternals, and shortly after that, the source code disappeared and is no longer available.
If you look hard, you might be able to find some old articles and such telling how to use it, but it's probably not going to be as easy as it should be...
Jerry Coffin
2010-02-03 03:31:09