GetProcessesList return PID from running processes
()
| 147 | |
| 148 | // GetProcessesList return PID from running processes |
| 149 | func GetProcessesList() (procsIds []uint32, bytesReturned uint32, err error) { |
| 150 | procsIds = make([]uint32, 2048) |
| 151 | err = windows.EnumProcesses(procsIds, &bytesReturned) |
| 152 | return procsIds, bytesReturned, err |
| 153 | } |
| 154 | |
| 155 | // GetProcessHandle return the process handle from the specified PID |
| 156 | func GetProcessHandle(pid uint32, desiredAccess uint32) (handle windows.Handle, err error) { |