C# Класс System.Diagnostics.ProcessManager

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetMainWindowHandle ( int processId ) : IntPtr
GetProcessIdFromHandle ( SafeProcessHandle processHandle ) : int

Gets the ID of a process from a handle to the process.

GetProcessIds ( ) : int[]

Gets the IDs of all processes on the current machine.

GetProcessIds ( string machineName ) : int[]

Gets the IDs of all processes on the specified machine.

GetProcessInfo ( int processId, string machineName ) : ProcessInfo

Gets the ProcessInfo for the specified process ID on the specified machine.

GetProcessInfos ( string machineName ) : System.Diagnostics.ProcessInfo[]

Gets process infos for each process on the specified machine.

IsProcessRunning ( int processId ) : bool

Gets whether the process with the specified ID is currently running.

IsProcessRunning ( int processId, string machineName ) : bool

Gets whether the process with the specified ID on the specified machine is currently running.

IsRemoteMachine ( string machineName ) : bool

Gets whether the named machine is remote or local.

OpenProcess ( int processId, int access, bool throwIfExited ) : SafeProcessHandle
OpenThread ( int threadId, int access ) : SafeThreadHandle

Приватные методы

Метод Описание
ConvertOsxThreadFlagsToWaitReason ( Interop flags ) : System.Diagnostics.ThreadWaitReason
ConvertOsxThreadRunStateToThreadState ( Interop state ) : System.Diagnostics.ThreadState
CreateProcessInfo ( Interop procFsStat, System.Text.ReusableTextReader reusableReader ) : ProcessInfo

Creates a ProcessInfo from the data parsed from a /proc/pid/stat file and the associated tasks directory.

CreateProcessInfo ( int pid ) : ProcessInfo
CreateProcessInfo ( int pid, System.Text.ReusableTextReader reusableReader = null ) : ProcessInfo

Creates a ProcessInfo from the specified process ID.

EnumerateProcessIds ( ) : IEnumerable

Enumerates the IDs of all processes on the current machine.

GetModules ( int processId ) : ProcessModuleCollection

Gets an array of module infos for the specified process.

IsProcessRunning ( int processId, int processIds ) : bool
ProcFsStateToThreadState ( char c ) : ThreadState

Gets a ThreadState to represent the value returned from the status field of /proc/pid/stat.

ProcessManager ( ) : System.Collections.Generic
ThrowIfRemoteMachine ( string machineName ) : void

Описание методов

GetMainWindowHandle() публичный статический Метод

public static GetMainWindowHandle ( int processId ) : IntPtr
processId int
Результат IntPtr

GetProcessIdFromHandle() публичный статический Метод

Gets the ID of a process from a handle to the process.
public static GetProcessIdFromHandle ( SafeProcessHandle processHandle ) : int
processHandle SafeProcessHandle The handle.
Результат int

GetProcessIds() публичный статический Метод

Gets the IDs of all processes on the current machine.
public static GetProcessIds ( ) : int[]
Результат int[]

GetProcessIds() публичный статический Метод

Gets the IDs of all processes on the specified machine.
public static GetProcessIds ( string machineName ) : int[]
machineName string The machine to examine.
Результат int[]

GetProcessInfo() публичный статический Метод

Gets the ProcessInfo for the specified process ID on the specified machine.
public static GetProcessInfo ( int processId, string machineName ) : ProcessInfo
processId int The process ID.
machineName string The machine name.
Результат ProcessInfo

GetProcessInfos() публичный статический Метод

Gets process infos for each process on the specified machine.
public static GetProcessInfos ( string machineName ) : System.Diagnostics.ProcessInfo[]
machineName string The target machine.
Результат System.Diagnostics.ProcessInfo[]

IsProcessRunning() публичный статический Метод

Gets whether the process with the specified ID is currently running.
public static IsProcessRunning ( int processId ) : bool
processId int The process ID.
Результат bool

IsProcessRunning() публичный статический Метод

Gets whether the process with the specified ID on the specified machine is currently running.
public static IsProcessRunning ( int processId, string machineName ) : bool
processId int The process ID.
machineName string The machine name.
Результат bool

IsRemoteMachine() публичный статический Метод

Gets whether the named machine is remote or local.
public static IsRemoteMachine ( string machineName ) : bool
machineName string The machine name.
Результат bool

OpenProcess() публичный статический Метод

public static OpenProcess ( int processId, int access, bool throwIfExited ) : SafeProcessHandle
processId int
access int
throwIfExited bool
Результат SafeProcessHandle

OpenThread() публичный статический Метод

public static OpenThread ( int threadId, int access ) : SafeThreadHandle
threadId int
access int
Результат SafeThreadHandle