Enumerate child processes in vb.net?

  • Thread starter Thread starter Sam Marrocco
  • Start date Start date
S

Sam Marrocco

Is it possible to enumerate/list the child or parent processes of a
process (given it's ID or name) in vb.net? I'd prefer to do so in all
managed code if possible....
 
EnumProcesses is the WinAPI function that you need to get all of the
processes, but from here at gets hairy...

the p-c relationship exists accurately only at the time that the child
process is spawned. this information is in the th32ParentProcessID
member of the PROCESSENTRY32 structure. the problem that you face is
that the OS re-uses PIDs immediately. I don't immediately see this in
the diagnostics namespace so you may have to resort to the Win32 API
 

Ask a Question

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.

Ask a Question

Back
Top