PS (Process Status) for Windows 95 and Windows NT

A PS (Process Status) program for Windows 95 and Windows NT. This is a program to list all the active processes under Windows 95 or Windows NT. It lists each program's full path name and Process ID. If you run it with no command line arguments, it displays the output on the console. If you supply an argument (regardless of what it is) it displays the output in a Listbox instead.

In addition, a simple "kill" command is included. If you type "kill" followed by the Process ID shown in the PS display, that process will be killed (unless it's a 16 bit Windows task, which would require a bit more work.) When using KILL, you can use hex, decimal or octal for the Process ID, following the normal C conventions -- a prefix of "0x" indicates hex, a prefix of `0' indicates octal, and no prefix indicates decimal.

Contents:
Full source code.
VC++ 5.0 SP3 project files. (untested with earlier versions)
hand-written makefile for command line builds.

Installation:

Unzip the ps_src.zip into a directory of your choice. Assuming you have VC++ correctly intalled, switch to that directory and type nmake. The executable should come to a bit under 8K.

If you use the VC++ project files, you'll probably get a message telling you that the project has been moved -- this is normal unless you happen to pick exactly the path name to put it in that I used.

Known bugs:

1) Under NT, DOS programs are not displayed. (16 bit Windows programs are...)

2) If you attempt to use the PID supplied for a 16 bit Windows program under NT to kill the program, killing the program will fail unless the kill program takes the special nature of the program into account. (You can kill the NTVDM that the Windows program runs under, and with sufficient code, you should be able to kill the Windows program by itself as well, but I don't know of a kill program that does so.)

This code was written by Jerry Coffin. It is hereby released into the public domain. Since the program is free, I provide no guaranty or warranty of any sort with it. However, if you report any bugs to jcoffin@taeus.com, there's a reasonable chance I'll try to fix them when I get a chance. Have fun.
Later,
Jerry.

Download demo project - 5KB

Download source - 16KB



Comments

  • help me please

    Posted by Legacy on 02/04/2004 12:00am

    Originally posted by: james lee

    what can i do by process handle ...?

    Reply
  • Idle Time of a system through VC++

    Posted by Legacy on 09/13/2003 12:00am

    Originally posted by: Rama Sastry

    How can i Get the idle time of the system through vc++
    

    Reply
  • How to get process info using process handle

    Posted by Legacy on 07/15/2003 12:00am

    Originally posted by: Alap

    Hi guys,

    I was trying to write a code using netstat and i wanted to list down process info for particular connection. I can get the handle from process id but then how to get process info using that process handle???

    alap.

    Reply
  • How can I get the networktraffic?

    Posted by Legacy on 03/27/2003 12:00am

    Originally posted by: Wolli

    How can I select the networktraffic and represented it in a view or diagram ?

    Reply
  • How can I check if some process is running, or, not.

    Posted by Legacy on 03/25/2003 12:00am

    Originally posted by: Venkat


    How can I check if some process is running, or, not.

    I would like to check if some process is running, or, not. How can i do that? (instead of using the process's path, but, just using the name of the process.)

    Venkat
    softwareexpert@tatanova.com

    Reply
  • Grate toolkit you are the best - Don't try TLIST to do this job

    Posted by Legacy on 02/03/2003 12:00am

    Originally posted by: dror

    Grate toolkit you are the best - Don't try TLIST to do this job

    Reply
  • How to get the CPU utilization of a computer

    Posted by Legacy on 01/15/2003 12:00am

    Originally posted by: Truong Quang Khai

    Please tell me how to measure CPU utilization of a computer.

    Reply
  • Getting all processes running ?

    Posted by Legacy on 12/30/2002 12:00am

    Originally posted by: Bhavin,Mukesh

    How do we get all the processes running on Win2K using platform SDK ?

    Reply
  • network

    Posted by Legacy on 11/19/2002 12:00am

    Originally posted by: ramu

    How to find how many computers are connected to lan.

    Reply
  • How to run a process in a network computer?

    Posted by Legacy on 11/01/2002 12:00am

    Originally posted by: Senthil Kumar.c

    Hi,

    How we can run one computer process in another computer in a NT network. Is there any for this? Please give your ideas.

    Thanks..

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

  • Live Event Date: September 16, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you starting an on-premise-to-cloud data migration project? Have you thought about how much space you might need for your online platform or how to handle data that might be related to users who no longer exist? If these questions or any other concerns have been plaguing you about your migration project, check out this eSeminar. Join our speakers Betsy Bilhorn, VP, Product Management at Scribe, Mike Virnig, PowerSucess Manager and Michele …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds