Board index » delphi » Displaying a list of running applications in Windows 2000/NT

Displaying a list of running applications in Windows 2000/NT

Hi,

I wonder if it's possible to obtain handles of running applications in
Windows 2000/NT (this list should equal to the list of the task manager;
that is, if you select the tab 'applications'). If so, then I would like to
send a 'close' message to one of those applications.

How can this be achieved?

Thanks in advance,

Erik Boerstoel.

 

Re:Displaying a list of running applications in Windows 2000/NT


In Windows NT you have to use the PSApi unit and in Windows 2000 you should
use the TLHelp32 unit. These units will be able to give you a list of
running applications and their process IDs. To close an application use
TerminateProcess with the process ID.

ps. Using PSApi/TLHelp32 can be quite tricky. It is far easier to use the
RunningProcessesList function from the JclSysInfo unit of the Jedi Code
Library (http://www.delphi-jedi.org/Jedi:CODELIBJCL).

Quote
"Erik Boerstoel" <epboerst...@boerstoel1.myweb.nl> wrote in message

news:9s425a$alb$1@cyan.nl.gxn.net...
Quote
> Hi,

> I wonder if it's possible to obtain handles of running applications in
> Windows 2000/NT (this list should equal to the list of the task manager;
> that is, if you select the tab 'applications'). If so, then I would like
to
> send a 'close' message to one of those applications.

> How can this be achieved?

> Thanks in advance,

> Erik Boerstoel.

Other Threads