Class process
Process functions. Find, enumerate, get basic info, terminate, triggers, etc. Also includes properties and events of current process and thread.
public static class process
Namespace: Au
Assembly: Au.dll
Properties
Name | Description |
---|---|
thisExeName | Gets file name of the program file of this process, like |
thisExePath | Gets full path of the program file of this process. |
thisProcessCultureIsInvariant | Gets or sets whether System.Globalization.CultureInfo.DefaultThreadCurrentCulture and System.Globalization.CultureInfo.DefaultThreadCurrentUICulture are System.Globalization.CultureInfo.InvariantCulture. |
thisProcessHandle | Returns current process handle. See API GetCurrentProcess. Don't need to close the handle. |
thisProcessId | Gets current process id. See API GetCurrentProcessId. |
thisProcessSessionId | Gets user session id of this process. |
thisThreadHandle | Returns native thread handle of this thread (API GetCurrentThread). |
thisThreadId | Gets native thread id of this thread (API GetCurrentThreadId). |
Methods
Name | Description |
---|---|
allProcesses(bool) | Gets basic info of all processes: name, id, session id. |
exists(string, bool?, bool) | Returns |
getCommandLine(int, bool) | Gets the command line string used to start the specified process. |
getDescription(int) | Gets description of process executable file. |
getName(int, bool, bool) | Gets process executable file name (like |
getProcessId(string, bool?, bool) | Gets process id of the first found process of the specified program. |
getProcessIds(string, bool?, bool) | Gets process ids of all processes of the specified program. |
getSessionId(int) | Gets user session id of a process (API ProcessIdToSessionId). |
getTimes(int, out long, out long) | Gets process creation and execution times (API GetProcessTimes). |
getVersionInfo(int) | Gets version info of process executable file. |
is32Bit(int) | Returns |
is32Bit(nint) | Returns |
processIdFromHandle(nint) | Gets process id from handle (API GetProcessId). |
suspend(bool, int) | Suspends or resumes the specified process. |
suspend(bool, string, bool) | Suspends or resumes all processes of the specified program or programs. |
terminate(int, int) | Terminates (ends) the specified process. |
terminate(string, bool, int) | Terminates (ends) all processes of the specified program or programs. |
thisProcessExitInvoke() | Calls and removes all process.thisProcessExit event handlers. |
thisThreadHasMessageLoop() | |
thisThreadHasMessageLoop(out bool) | Returns |
triggers(bool?, string, bool, int) | Provides process started/ended triggers in |
waitForExit(Seconds, int, out int) | Waits until the process ends. |
Events
Name | Description |
---|---|
thisProcessExit | Before this process exits, either normally or on unhandled exception. |