hi... how get name of process and kill once ... i do it in c# , but i need c++ codes. thx for your helpping
Since you have not mentioned the OS, so I assume the OS to be Linux. You should know the PID of the process and then replace the PID in the path /proc/PID/cmdline Open the following file and you will get the name of the process and the arguments passed to it.
thx... no in widows. look this : Code: #include "conio.h" #include <iostream> int main() { int i=system("tasklist"); printf("%s",i); getch(); return 0; } but it is'not useful; because i need array of process name for process
I am not a windows programming expert but still you can look at the following discussions : http://bytes.com/topic/c/answers/759932-getting-all-running-process-names-windows http://cboard.cprogramming.com/windows-programming/102412-get-current-process-name-id-window.html
thx. ok . find it at last . TerminateProcess(OpenProcess(PROCESS_TERMINATE,FALSE,PID),0) //Where PID is a int (or UNIT) --- now i need too PID number... how get it ? for example yahoo in my pc is 5328, and chang if closed ; but how the program find it ?