• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

How can I see Windows processes ?

How can I see Windows processes like unix command 'ps' or Back Office... or WinTop. And how can I kill process using some processID?

Thank

Beast.
0
Beast101598
Asked:
Beast101598
  • 5
  • 3
1 Solution
 
dwwangCommented:
By calling API below in sequence,
  1. CreateToolhelp32Snapshot
  2. Process32First
  3. Process32Next

you can get  PROCESSENTRY32 structure,
from which you can find ThreadHandle, or ProcessHandle

Then you can kill process using TerminateProcess (or CloseHandle)
0
 
EmmDiehCommented:
Better then that, a programmer-group implemented these
unix commands for win32.
look for and download a package called unix956 or unix95.
i don't have a valid link any more, because it's been
a long time ago since i downloaded it.
It contain very valualbe commands like ls, ps, kill, tail,..

0
 
Beast101598Author Commented:
maybe some sample?
that would be great...

fnx
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
dwwangCommented:
Go to this site and you will get detailed explanation as well as examples.

http://www.innotts.co.uk/~zephyr/modules.html
0
 
dwwangCommented:
Is that site helpful?
0
 
Beast101598Author Commented:
dwwang,
example at http://www.innotts.co.uk/~zephyr/modules.html not work.
can you help me?
0
 
dwwangCommented:
Why it doesn't work?
0
 
dwwangCommented:
Hi, I realized that this example is just showing how to use tlhelp32 unit, what you need to do is to translate it into a programm dealing with processes. That is to replace all the 'Module' with 'Process'(thanks for the similarity in name of those structures), and do some other neccesary modifications:

1. remove those threee +1 after the sz....;
2. get the property you want (such as processID etc.) rather than the original filename property of ModuleEntry.
3. If you want to compile it in D4, change the type of VerLength from integer to Cardinal;
0
 
Beast101598Author Commented:
ok
thats work with modules.
v. Thanks

but if you have sample with procceses, send my in minde@goda.vtu.lt
bye
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now