Use CreateToolhelp32Snapshot() with the TH32CS_SNAPPROCESS flag and Process32First() and Process32Next() to get a list of processes on the system.
For each process, create another snapshot using the TH32CS_SNAPMODULE flag and the process ID. For each module ID use GetModuleFileName() , and look for the modules whose names end in ".exe".
The MSDN toolhelp documetation gives examples like how to traverese the module list .
Don't forget to use CloseHandle() on each snapshot when you are done with it.
Hope this helps.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229