Volume Control
Application-specific hotkeys for Windows
|
Extension methods for the Process class. More...
Static Public Member Functions | |
static bool | HasExited (this Process p) |
This fixes a bug that microsoft hasn't fixed since at least Windows Vista that occurs when calling Process.HasExited. DO NOT USE THE Process.HasExited PROPERTY, USE THIS INSTEAD! More... | |
static ? string | GetMainModulePath (this Process process) |
Gets the full path to the specified Process, process . More... | |
static ? string | GetMainModulePathWMI (this Process process) |
Gets the full path to the specified Process, process . More... | |
Extension methods for the Process class.
|
static |
Gets the full path to the specified Process, process .
Using this instead of accessing Process.MainModule directly prevents exceptions when accessing a process built for a different architecture (32/64 bit)
process | Process |
null
.
|
static |
Gets the full path to the specified Process, process .
This method uses WMI to make an SQL query, and as such, is very slow! Use GetMainModulePath(Process) instead wherever possible.
process | Process |
null
.
|
static |
This fixes a bug that microsoft hasn't fixed since at least Windows Vista that occurs when calling Process.HasExited.
DO NOT USE THE Process.HasExited PROPERTY, USE THIS INSTEAD!
Sources:
https://www.giorgi.dev/net/access-denied-process-bugs/
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess
https://docs.microsoft.com/en-ca/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocesstimes
https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-closehandle
p | Process instance. |