I need a way to get PIDs of processes that have specific 32-bit .dll
module loaded. Powershell (x86) has Get-Process -Module
, but it takes too long and doesn't have PID linked if -Module
argument specified. wmic
has fast process
, but nothing about modules. Psapi.h
has EnumProcessModules
, but then I will have to get a handle for every process, which probably be quite slow. Is there any nice and fast way of doing it with cmd/powershell/standard dll?
tasklist /m user32.dll
tasklist
only searches in 64-bit modules, andC:\Windows\SysWOW64\tasklist.exe
is extremely slow (like few minutes to half an hour)