This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ps, test, /dev/null questions


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
kcantrel@dg.rtp.com
*** Don't forget to smile...that's why God gave us Fangs ***



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]