W
whitelion
Unregistered / Unconfirmed
GUEST, unregistred user!
STARTUPINFO * mystartupinfo=new STARTUPINFO;<br> PROCESS_INFORMATION * myprocess_information=new PROCESS_INFORMATION;<br> mystartupinfo->dwFlags=STARTF_USESHOWWINDOW;<br> mystartupinfo->wShowWindow=SW_SHOWNORMAL;<br> if (!<br> CreateProcess(NULL,cargu,NULL,NULL,true,<br> CREATE_DEFAULT_ERROR_MODE NORMAL_PRIORITY_CLASS CREATE_NEW_CONSOLE,<br> NULL,NULL,mystartupinfo,myprocess_information))<br> {<br> ShowMessage("压缩失败,系统进行第二套方案...");<br> delete mystartupinfo;<br> delete myprocess_information;<br> return;<br> }<br> else<br> {<br> WaitForSingleObject(myprocess_information->hProcess,INFINITE);<br> GetExitCodeProcess(myprocess_information,&s);<br> delete mystartupinfo;<br> delete myprocess_information;<br> }<br>以上是一段bcb代码,为什么这个函数有时候好用,有什么不好用(可能在第一次执行时好用,但连续运行几次后就不能运行了)