How to terminate a Process by Name ?? 
Author Message
 How to terminate a Process by Name ??

Hello !

I want to terminate a Process (on win2000) like the Taskmanager but now
in C++ with VisulaC. My Question: In the Taskmanager, each Process has
a name. How Can I Terminate a Process by this name ? How Do I get the
ProcessID, if I only know the Application Name ? The Process has no
window so I can not use FindWindow() and the WM_CLOSE Msg (ist his
correct ?).

Please give me an answear also to my Email, because I'm behind a
firewall and have only at home access to the newsgroups...
thanks !
You can write in German or english...

sincere M.Egloff

--
////////////////////////////////////////////////////////////////////////
// Egloff Mark             Zellweger Uster
// Dipl. Ingenieur         Wilstrasse 11, CH-8610 Uster

//www.uster.com           fax    ++41 1 943 38 22
////////////////////////////////////////////////////////////////////////
The flesh is a trap but the magic gives us the freedom.....

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 23 Dec 2002 03:00:00 GMT  
 How to terminate a Process by Name ??
Hello !

I want to terminate a Process (on win2000) like the Taskmanager but now
in C++ with VisulaC. My Question: In the Taskmanager, each Process has
a name. How Can I Terminate a Process by this name ? How Do I get the
ProcessID, if I only know the Application Name ? The Process has no
window so I can not use FindWindow() and the WM_CLOSE Msg (ist his
correct ?).

Please give me an answear also to my Email, because I'm behind a
firewall and have only at home access to the

You can write in German or english...

sincere M.Egloff

--
////////////////////////////////////////////////////////////////////////
// Egloff Mark             Zellweger Uster
// Dipl. Ingenieur         Wilstrasse 11, CH-8610 Uster

//www.uster.com           fax    ++41 1 943 38 22
////////////////////////////////////////////////////////////////////////
The flesh is a trap but the magic gives us the freedom.....

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 23 Dec 2002 03:00:00 GMT  
 How to terminate a Process by Name ??
Egloff Mark a crit :

Quote:
> My Question: In the Taskmanager, each Process has
> a name. How Can I Terminate a Process by this name ? How Do I get the
> ProcessID, if I only know the Application Name ? The Process has no
> window so I can not use FindWindow() and the WM_CLOSE Msg (ist his
> correct ?).

Enumerate the processes until you find yours, then OpenProcess(),
TerminateProcess(), CloseHandle()
KB : http://support.microsoft.com/support/kb/articles/q175/0/30.asp


Mon, 23 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to terminate a Process by Name ??

2. Getting process name in the process

3. Solution for retrieving the process name based on its process ID

4. Getting function name/process from within running process.

5. Find out the name of a process (process.exe) from a window handle (CWnd)

6. Terminating a child process

7. Process suddenly terminates without notification

8. terminate process

9. Debugged Process will not Terminate under Win2K

10. Process suddenly terminates without notification

11. Terminate Process and SecurityIno ?

12. Find and terminate a process under WIN98

 

 
Powered by phpBB® Forum Software