Process.HandleCount Property

Gets the number of handles opened by the process.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

[<MonitoringDescriptionAttribute("ProcessHandleCount")>]
member HandleCount : int with get

Property Value

Type: System.Int32
The number of operating system handles the process has opened.

ExceptionCondition
PlatformNotSupportedException

The platform is Windows 98 or Windows Millennium Edition (Windows Me); set the ProcessStartInfo.UseShellExecute property to false to access this property on Windows 98 and Windows Me.

Handles provide a way for a process to refer to objects. A process can obtain handles to files, resources, message queues, and many other operating system objects. The operating system reclaims the memory associated with the process only when the handle count is zero.

Windows 98, Windows Millennium Edition Platform Note: This property is not available on this platform if you started the process with ProcessStartInfo.UseShellExecute set to true.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

  • LinkDemand 

    for full trust for the immediate caller. This member cannot be used by partially trusted code.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft