Computing.Net > Forums > Windows NT > Handle and Thread Count

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Handle and Thread Count

Reply to Message Icon

Name: jar
Date: December 6, 2006 at 22:11:13 Pacific
OS: Win NT
CPU/Ram: any
Product: any
Comment:

Hi,

Anybody knows how to programmatically retrieve the handle count and thread count of the running process?
I mean, similar to the Task Manager, each process has its handle and thread counts opened.
I appreciate for your help guys. Thanks so much!



Sponsored Link
Ads by Google

Response Number 1
Name: reader01
Date: June 24, 2007 at 14:05:02 Pacific
Reply:

All I know about how to get the thread counts is to instal the WinNT recource kit, open Wperf.exe, hit SELECT, and check Thread Count.

Hope this is helpful!

dellano


0

Response Number 2
Name: reader01
Date: July 10, 2007 at 19:47:41 Pacific
Reply:

RESPONSE NO.1
NOT HELPFUL, MORON!

Windows NT 4.0 Service Pack 6a - NT Resource Kit
installed


0

Response Number 3
Name: Naresh Mittal
Date: February 19, 2009 at 18:00:11 Pacific
Reply:

The easiest way to get the threads or handles used by a process is to first to get the process info and then retrieve the desired info as shown below -

Process appProcess = Process.GetProcessById(processId); // Can get process by name also
int threads = appProcess.Threads.Count;
int handles = appProcess.HandleCount;

As this information is a snapshot of the process, calling the Process.Refresh() method at desired intervals is required to get the latest counts.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


How to backup Windows NT Server 4.0


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Handle and Thread Count

NT Enterprise vs Standard What's the Diference:How Can I tell www.computing.net/answers/windows-nt/nt-enterprise-vs-standard-whats-the-diferencehow-can-i-tell/3953.html

I can't see all programs in control pane www.computing.net/answers/windows-nt/i-cant-see-all-programs-in-control-pane/13260.html

why so slow? www.computing.net/answers/windows-nt/why-so-slow/20523.html