Making a list of running programs 
Author Message
 Making a list of running programs

I am trying to build a program which starts other applications (kind of
"control panel"). I want to be able to make the list of all running apps in
order to forbid a "second start" of an already running program. Since I am a
very very new VC++ user, any hint on where I should start?

Thanks,

Raynald



Fri, 07 Jul 2000 03:00:00 GMT  
 Making a list of running programs

Seach for Process32First/Process32Next functions  to work on win95 and
EnumProcesses () for NT on your MSVC help. That will give you an idea
what to do.
In case of 95, you need to
1.Create a toolhelp snapshot  (Createtoolhelp32Snapshot)
2.Use Process32First/Next to loop thru all the process info in the
system.
2a. Get the file names in the loop
3. Close the handle to snapshot

In case of NT, Use EnumProcesses to get the list of Process IDs.
Download Oc97.zip from www.wdj.com code archives. in that esposito.zip
which does something similar. THat code is to get the process name given
handle of the window. But, you can modify it to do your stuff.
Also, there are some very neat articles by Matt pietrek on the subject
in 96 and 97 year issues of MSJ. Search for "Matt Pietrek AND toolhelp
AND PSAPI.DLL" on MSDN or MSDN online to read more about it.

Quote:

> I am trying to build a program which starts other applications (kind of
> "control panel"). I want to be able to make the list of all running apps in
> order to forbid a "second start" of an already running program. Since I am a
> very very new VC++ user, any hint on where I should start?

> Thanks,

> Raynald


--
Girish Bharadwaj [VC++/MVP]
http://members.tripod.com/~GBharadwaj/index.html



Sat, 08 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DBX makes program run?

2. Programmatically making a program automatically run when Windows is started

3. Getting the list of programs currently running

4. Running a program without it being displayed in the Task List

5. Listing of all programs running

6. list of all running programs

7. running program list

8. PocketPC Dialog Application not in running program list

9. No entry in Running Program List

10. program runs in debuggin mode but not when running in the shell

11. Making properties available only at run-time

12. Running an mfc application made for 95 on NT

 

 
Powered by phpBB® Forum Software