IsProcessRunning determines whether the process is in a running state.
(proc windows.Handle)
| 97 | |
| 98 | // IsProcessRunning determines whether the process is in a running state. |
| 99 | func IsProcessRunning(proc windows.Handle) bool { |
| 100 | var exitcode uint32 |
| 101 | err := windows.GetExitCodeProcess(proc, &exitcode) |
| 102 | if err != nil { |
| 103 | return false |
| 104 | } |
| 105 | return exitcode == ProcessStatusStillActive |
| 106 | } |
| 107 | |
| 108 | // IsProcessPackaged determines if the process is packaged by trying |
| 109 | // to resolve the package identifier. |
no outgoing calls