草庐IT

aCurrentDirectory

全部标签

windows - 如何判断外部应用程序何时在 delphi 中结束

我正在使用ShellExecute运行外部应用程序我如何知道外部应用程序何时结束?这是我的代码theProgram:='MySql.exe';itsParameters:='-uuser1-ppassword-e"createdatabaseabc"’;rslt:=ShellExecute(0,'open',pChar(theProgram),pChar(itsParameters),nil,SW_SHOW); 最佳答案 尝试以下功能。WaitForSingleObject可以满足您的需求。functionExecAppAndWai