Enumerate modules with CreateToolhelp32Snapshot.
Category: 100 Days of Code
Enumerating Processes with CreateToolhelp32Snapshot
Quick and dirty example of process enumeration using CreateToolhelp32Snapshot
Enumerating Processes with WTSEnumerateProcesses
Quick example of using WTSEnumerateProcesses to enumerate processes running on a Windows machine.