System.Diagnostics.Process.Handle Property

Gets the native handle of the associated process.

Syntax

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Diagnostics.MonitoringDescription("Handle for this process.")]
public IntPtr Handle { get; }

Value

Documentation for this section has not yet been entered.

Remarks

An application can obtain a handle to a process that can be used as a parameter to many process-information and control functions. You can use this handle to initialize a System.Threading.WaitHandle or to call native methods with platform invoke.

This process handle is private to an application--in other words, process handles cannot be shared. A process also has a process Process.Id which, unlike the Process.Handle, is unique and, therefore, valid throughout the system.

Only processes started through a call to Process.Start set the Process.Handle property of the corresponding System.Diagnostics.Process instances.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0