NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Process Class

Provides access to local and remote processes. Enables you to start and stop system processes.

Object
   Component
      Process

[Visual Basic]
Public Class Process
   Inherits Component
[C#]
public class Process : Component
[C++]
public __gc class Process : public Component
[JScript]
public class Process extends Component

Remarks

A Process component provides access to an executable running on a computer. A process, in the simplest terms, is a running application. A thread is the basic unit to which the operating system allocates processor time. A thread can execute any part of the process code, including parts currently being executed by another thread.

The Process component is a useful tool to monitor applications. Using the Process component, you can obtain a list of processes that are running, or start a new process. A Process component is used to access system processes. Once a Process component has been initialized, it can then be used to obtain information about the running process, such as the set of threads, loaded modules (.dll or .exe's), or performance information such as the amount of memory the process is using. Once the Process component has obtained information about the associated process, it will not try to obtain it again until you call the Refresh method.

A system process is identified uniquely on the system by its process ID In addition, a process, like many Windows resources, has a handle by which it identifies itself, but which may not be unique on the computer. A handle is the generic term for an identifier to a resource. The process handle, accessed through the Handle property on the Process component, is persisted by the operating system even when the process has exited so that you can get administrative information about the process, like the ExitCode (usually, 0 for success or a non-zero error code) and the ExitTime. Handles are an extremely precious resource, so leaking handles is more virulent than leaking memory. The operating system will only release the handle and associated data when there are no longer any handles to the process on the system, when the HandleCount is 0.

Requirements

Namespace: System.Diagnostics

Assembly: System.Diagnostics.dll

See Also

Process Members | System.Diagnostics Namespace | Start | ProcessStartInfo | CloseMainWindow | Kill | ProcessThread