I have a process(root) which spawns other processes to get its work done. These 
children in turn may spawn more processes and so on. I want to obtain the 
memory used by all of these processes at a point of time from the root 
process(very 1st process).
So, I neeed 2 things:

First is to obtain all the process handles of this process tree.
So, Is there a way to find all the child processes for a particular process. 
Right now I am using "CreateToolhelp32Snapshot" to obtain a snapshot of all the 
processes in the system and then looking for the processes which have root 
process as their parent. Doing this recursively to obtain the whole process 
Is there a better approach available for doing this?

Secondly, get the memory used by process. Is there an API available to do this? 
Can not use "PSAPI" as its not for Win95, 98.


This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].