Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Process.HandleCount Property

Gets the number of handles opened by the process.

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

public int HandleCount { get; }
/** @property */
public int get_HandleCount ()

public function get HandleCount () : int

Property Value

The number of operating system handles the process has opened.
Exception typeCondition

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.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.