delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/21/13:16:36

From: kcantrel AT dg-rtp DOT dg DOT com (Ken Cantrell)
Subject: Re: ps, test, /dev/null questions
21 Sep 1997 13:16:36 -0700 :
Message-ID: <9709211928.AA22150.cygnus.gnu-win32@dg-rtp.dg.com>
Mime-Version: 1.0
To: "Sergey Okhapkin" <sos AT prospect DOT com DOT ru>, <gnu-win32 AT cygnus DOT com>,
"'Khosla, Deepak'" <DKhosla AT Compaq DOT com>

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 AT dg DOT rtp DOT 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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019