Subject: Re: ps, test, /dev/null questions
From: [email-masked] (Ken Cantrell)

21 Sep 1997 13:16:36 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Sergey Okhapkin" <[email-masked]>, <[email-masked]>,
        "'Khosla, Deepak'" <[email-masked]>

Sergey (and others who may be interested),

>NT's built-in task manager will show you all the running processes. Do you
>know a _documented_ way to enumerate running processes on Windows NT?-)
>

There are actually a couple of different, documented, ways to do this.  You
can use EnumProcess (in PSAPI.DLL), or you can pull a list of all the running
processes out of the registry.  Using the registry is more difficult, but if
you do go that route, you can also get a list of all the threads as well,
which, to my knowledge, you can't get by using the PSAPI.DLL stuff.

If you have the MSDN, here are some links to look at for finding out more:

The Registry Interface to Performance Data in NT:
mk:@ivt:pdwbase/native/sdk/win32/pdh/src/perf1cf9.htm

How to use EnumProcess (source code example):
mk:@ivt:pdwbase/native/sdk/win32/sys/src/psap9cmr.htm

The MSDN is online (http://www.microsoft.com/msdn), you should be able to
figure out the online URLs from those above.   If not, let me know, and I can
find them for you.

********************************************************************
Ken Cantrell
DG Performance Modeling
x5879
[email-masked]
*** Don't forget to smile...that's why God gave us Fangs ***

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".