I have created a SnapShot of all the processes running by using CreateToolHelp32Snapshot.

I then iterate through all the processes by using Process32First and Process32Next as detailed in the following article:


However, when I get to any process called "Svchost.exe" I want to be able to see which services that process is hosting and, if possible, its name listed as "Service Host: xxxxxxxx" (where "xxxxxx" is something like 'Local Service' or 'Remote Procedure Call' or whatever... just like it appears in Task Manager).

How can I see which processes each instance of "SvcHost.exe" is hosting and how can I list them, using win32api function calls?