Documentation
¶
Index ¶
- Constants
- func GetExecutableFromHandle(hWnd uintptr) (string, error)
- func GetExecutableFromPID(pid uint32) (string, error)
- func GetFullExecutableFromPID(pid uint32) (string, error)
- func GetProcessIDByExecutable(executable string) (uint32, error)
- func GetProcessIDFromWindow(hWnd uintptr) (uint32, error)
- type Win32_Process
Constants ¶
const ( PROCESS_QUERY_INFORMATION = 0x0400 PROCESS_VM_READ = 0x0010 )
Variables ¶
This section is empty.
Functions ¶
func GetExecutableFromHandle ¶
GetExecutableFromHandle tries to get the (short) executable name of a window given the window handle.
Returns either the Executable as a string or an error if the executable could not be found.
func GetExecutableFromPID ¶
GetExecutableFromPID functions like GetFullExectuableFromPID but returns only the executable's name. E.g Program.exe
For more information, see GetFullExecutableFromPID.
Returns either the Executable as a string or an error if the executable could not be found.
func GetFullExecutableFromPID ¶
GetFullExecutableFromPID tries to get the full path of the executable of a process with the given PID (Process ID). E.g. C:/Applications/Program.exe
Returns either the Executable as a string or an error if the executable could not be found.
func GetProcessIDByExecutable ¶
GetProcessIDByExecutable tries to find the PID (Process ID) of a process with the given executable.
Returns either the PID as a uint32 or an error if no PID could be found.
func GetProcessIDFromWindow ¶
GetProcessIDFromWindow tries to find the PID (Process ID) of a process with the given window handle.
Returns either the PID as a uint32 or an error if no PID could be found.
Types ¶
type Win32_Process ¶
Win32_Process WMI class structure