How to kill a process and a specific handle of process in C#
-
Hi, Is there any way to kill a process and to close only a handle of a process(not complete process).
-
Hi, Is there any way to kill a process and to close only a handle of a process(not complete process).
A handle is representative of an object, how would you close a handle, but not the object it represents ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
A handle is representative of an object, how would you close a handle, but not the object it represents ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
your are right, but the Process Explorer(Sys Internal) supports to close the handle too, i wonder how did the Process Explorer team achieve that task. I am sorry if have done some english grammatical mistakes. Regards, Mushq
-
Hi, Is there any way to kill a process and to close only a handle of a process(not complete process).
Hello, Killing a process is possible over the System.Diagnostics.Process class. (method kill) To get the process you could use GetProcessByName method.
Mushq wrote:
and to close only a handle of a process
I think you have to specify a little more what you whant to do. All the best, Martin
-
Hello, Killing a process is possible over the System.Diagnostics.Process class. (method kill) To get the process you could use GetProcessByName method.
Mushq wrote:
and to close only a handle of a process
I think you have to specify a little more what you whant to do. All the best, Martin
Thanx, I have got the answer of my first part of question that how to kill a process, and about handle, for that i am taking particular example of Explorer.exe process, I have created Test folder in C dervice, and Test Folder in D Derive, and i have opened both of them simultaneously, Explorer.exe process has got handle of both these opened folder, when i search C:\Test in process explorer(Sys Internals), then it shows me that explorer.exe has loaded the handle C:\Test Folder. I am sorry if have done some english grammatical or spelling mistakes. Regards, Mushq
-
Hi, Is there any way to kill a process and to close only a handle of a process(not complete process).
There is a utility called 'TaskManager Extension' in CodeProject. I think that should be able to address your requirement. Since the code is also there, you should be able to follow this requirement soon. Check out http://www.codeproject.com/system/Task_Manager_Extension.asp[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Thanx, I have got the answer of my first part of question that how to kill a process, and about handle, for that i am taking particular example of Explorer.exe process, I have created Test folder in C dervice, and Test Folder in D Derive, and i have opened both of them simultaneously, Explorer.exe process has got handle of both these opened folder, when i search C:\Test in process explorer(Sys Internals), then it shows me that explorer.exe has loaded the handle C:\Test Folder. I am sorry if have done some english grammatical or spelling mistakes. Regards, Mushq
Hello, I'm just curious, so please don't think I'm rude. But have you voted me down couse I haven't answered you second question? If yes! I didn't take time, cause I have work to do and I thought the answere from Vasudevan Deepak Kumar [^] should help you enough! If not, sorry for asking! All the best, Martin
-
Hello, I'm just curious, so please don't think I'm rude. But have you voted me down couse I haven't answered you second question? If yes! I didn't take time, cause I have work to do and I thought the answere from Vasudevan Deepak Kumar [^] should help you enough! If not, sorry for asking! All the best, Martin
I hadn't rated your answer down, i have given 5/5, you can check that there are two votes have been given to your message, i have given 5/5, and there is some one else who has rated that down, even i have replied that message with thanks. I hope it is clear now :) sorry for my english if it is not correct! Best Regards, Mushq
-
I hadn't rated your answer down, i have given 5/5, you can check that there are two votes have been given to your message, i have given 5/5, and there is some one else who has rated that down, even i have replied that message with thanks. I hope it is clear now :) sorry for my english if it is not correct! Best Regards, Mushq
Mushq wrote:
I hadn't rated your answer down, i have given 5/5, you can check that there are two votes have been given to your message, i have given 5/5, and there is some one else who has rated that down, even i have replied that message with thanks.
I was assuming this! Again, I'm really sorry for asking but I'm allways a little confused when I get downvoted with no explination! Thanks for your time All the best, Martin