Home > OS >  Rookie, open the console with WinExec program, the process of how to obtain the pid
Rookie, open the console with WinExec program, the process of how to obtain the pid

Time:09-29

Now need to a.e xe with WinExec function calls the console program b.e xe, after the call with taskkill kill b process, but now I want to run multiple a.e xe, according to the process name to kill words will one-time kill all b process, which could cause problems, so would you like to go one by one according to the pid closed b process, excuse me how to get b process pid,

CodePudding user response:

With CreateProcess or ShellExecuteEx, after the incoming parameters, execute successfully returns process related information, winexec without this feature, was set up for compatible winexec