how to end a process remotely from server?
-
pls do help me in ending a process from the server without shutting down the remote host.. while using InitiateSytemShutdown() it forcefully closes and then shutdowns the system. but i need to end the process wihtout shutting down the system. pls do reply as early as possible..
-
pls do help me in ending a process from the server without shutting down the remote host.. while using InitiateSytemShutdown() it forcefully closes and then shutdowns the system. but i need to end the process wihtout shutting down the system. pls do reply as early as possible..
void EndProcess(string PID) { HANDLE ps; int id=atoi(PID.c_str()); ps = OpenProcess(1,false,id); if(ps) { if(!TerminateProcess(ps,-9)) { ShowMessage("Could not end process specified!"); } else { ShowMessage("Process successfully terminated!"); } } }
Is that what you want?