>I need to know how many instances of an application are running. The main window title for the application might or might not be different among the running instances, so I cannot use findwindow. What I would really like to be able to do is sniff the system's task list... as I need something that would perform the equivalent of (if it existed) an ATasks() function. Each row would contain info about a running task, and the columns would contain things like the EXE name, the PID, the length of time it has been running, etc. Any suggestions? Thanks very much.
>
>P.S. Maybe instead of ATasks(), I could use ATasker() function call. :-) George?
You could use the findwindow. Findwindow not only searches based on title but class as well. Doing a tasklist interface is too much complex to do with VFP IMHO. It'd be different for win9x and NT, ahve callback functions which are not supported by VFP etc. However there might be wrappers somewhere. Tlist and kill utilities are MS published ones with full c code (probably in MSDN lib).
Update : Yes tlist is on MSDN lib.
Visual C++ documentation\Samples\SDK samples\SDK tools samples\TList: Task List Application Sample
Cetin