PSAPI / ToolHelp / BruteForcing PIDs with NtOpenProcess/OpenProcess with GetModuleFileNameEx / PEB access to LDR_MODULE / NtQueryVirtualMemory with class of SectionNameInformation on ImageBase of executable (also contained in PEB), NtQuerySystemInformation to get threads and process list etc. CSRSS also contains PIDs of processes which *register* with it, this can be traversed as well.
PSAPI and ToolHelp just wrap these methods when it all boils down to it, primarily native calls (NtQuerySystemInformation / NtQueryVirtualMemory with section name of image and usermode PEB module name in linked-lists)
Many ways to enumerate processes :lol:
Accept nothing less than STATUS_SUCCESS