mitchellh / go-ps

Find, list, and inspect processes from Go (golang).
MIT License
1.46k stars 250 forks source link

Add ActiveProcess to get active window process #20

Closed filipemeneses closed 3 years ago

filipemeneses commented 7 years ago

The method get the process from the active window. There are similar methods in the DLL but have some restrictions, using the snapshot bypass it.

Unfortunately had to load user32.dll to get the active window.