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.HandleCount

Gets the number of handles that are associated with 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 currently associated with the process.

Remarks

Handle is a way to refer to a process object from within an application. An application can obtain a handle to a process which can be used as a parameter to many process-information and control functions. This handle is private to an application--process handles cannot be shared (is this the same type of handle?). In addition to the handle, a process has a process Id which, unlike the Handle, is valid throughout the system.

When you start a Process within a calling application, the HandleCount increments to reflect the active process. You associate additional Win32 handles to the process by calling the process additional times in your code. When a process is terminated, the HandleCount is decreased.

See Also

Process Class | Process Members | System.Diagnostics Namespace | Handle | Start | CloseMainWindow | Kill