Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Friends,

I have developed a window application.when ever i used to close the exe of the application,memory error throwned.after that i make it close by using task manager.now i want to kill the exe from the task manager whenever i closed.

how to match the running process using its name?
can anyone help me ..i will be thanksful to you for this help..

thanks in advance
Posted

Instead of screwing around trying to kill a process, I'd put your effort into fixing the memory problem!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 24-Jan-13 15:42pm    
Exactly. A 5.
—SA
jai_mca 24-Jan-13 23:01pm    
how to fix the memory problem?
Dave Kreskowiak 25-Jan-13 0:00am    
Considering we know NOTHING about the app nor what it's doing nor what it uses nor what exactly happens when the crash occurs, there's nothing anyone can tell you to help.
jai_mca 28-Jan-13 23:44pm    
ok dave...thanks for your reply.i have solved..
You can use the Process Diagnostic class[^].

Here are some examples -
http://www.dotnetperls.com/kill[^]
http://alperguc.blogspot.in/2008/11/c-process-processgetprocessesbyname.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900