Process.HandleCount Property
Gets the number of handles opened by the process.
[Visual Basic] Public ReadOnly Property HandleCount As Integer [C#] public int HandleCount {get;} [C++] public: __property int get_HandleCount(); [JScript] public function get HandleCount() : int;
Property Value
The number of operating system handles the process has opened.
Remarks
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 Platform Note: This property is not available on this platform if you started the process with ProcessStartInfo.UseShellExecute set to true.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- SecurityPermission for calling any members of System.Diagnostic.Process with full trust. Associated enumeration: PermissionState.Unrestricted
See Also
Process Class | Process Members | System.Diagnostics Namespace | Handle | Start | CloseMainWindow | Kill