Solved

How can I see Windows processes ?

Posted on 1998-10-19
9
154 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
Comment Utility
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
Comment Utility
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
Comment Utility
maybe some sample?
that would be great...

fnx
0
 
LVL 4

Expert Comment

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

http://www.innotts.co.uk/~zephyr/modules.html
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 4

Expert Comment

by:dwwang
Comment Utility
Is that site helpful?
0
 

Author Comment

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

Expert Comment

by:dwwang
Comment Utility
Why it doesn't work?
0
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 226
Component or function to create an ICS-file 2 90
APK file name 7 63
System restore point 4 77
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

763 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

7 Experts available now in Live!

Get 1:1 Help Now