winforms - c++ terminate process in window forms -
winforms - c++ terminate process in window forms -
i want create windows forms app , want terminate programme it
system("tskill process");
doesnt't work nor calling bat file doing operation
i think have utilize terminateprocess() terminateprocess don't know set callback functions illustration in button code
private: system::void button4_click(system::object^ sender, system::eventargs^ e) {}
your callback looks in c++/cli assume using language.
here's simple code kill process named myprocess
array<process^>^ processes = process::getprocessesbyname("myprocess"); each (process^ p in processes) p->kill();
note may need run programme in administration mode. getprocessesbyname returns array of process, in case have several instances of myprocess can kill of them code.
to utilize process class, sure add together in source file:
using namespace system::diagnostics;
winforms process c++-cli terminate
Comments
Post a Comment