Solved

How can I see Windows processes ?

Posted on 1998-10-19
9
156 Views
Last Modified: 2010-04-06
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
Comment
Question by:Beast101598
  • 5
  • 3
9 Comments
 
LVL 4

Accepted Solution

by:
dwwang earned 100 total points
ID: 1343367
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
 
LVL 1

Expert Comment

by:EmmDieh
ID: 1343368
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
 

Author Comment

by:Beast101598
ID: 1343369
maybe some sample?
that would be great...

fnx
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1343370
Go to this site and you will get detailed explanation as well as examples.

http://www.innotts.co.uk/~zephyr/modules.html
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Expert Comment

by:dwwang
ID: 1343371
Is that site helpful?
0
 

Author Comment

by:Beast101598
ID: 1343372
dwwang,
example at http://www.innotts.co.uk/~zephyr/modules.html not work.
can you help me?
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1343373
Why it doesn't work?
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1343374
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
 

Author Comment

by:Beast101598
ID: 1343375
ok
thats work with modules.
v. Thanks

but if you have sample with procceses, send my in minde@goda.vtu.lt
bye
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to draw animated progressbar in Tvirtualstringtree 5 117
delphi exception 7 63
creating threads in delphi 1 84
Convert MS Word document to a PDF file 9 65
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now