L
lkdbdlkq
Unregistered / Unconfirmed
GUEST, unregistred user!
function waitrun(appansichar):cardinal;<br>var<br>si:startupinfo;<br>pirocess_information;<br>begin<br> fillchar(si,sizeof(si),0);<br> fillchar(pi,sizeof(pi),0);<br> si.cb:=sizeof(si);<br> si.dwFlags:=startf_useshowwindow;<br> si.wShowWindow:=sw_hide;<br> createprocess(nil,app,nil,nil,false,normal_priority_class,nil,nil,si,pi);<br> waitforinputidle(pi.hprocess,infinite);<br> result:=pi.dwProcessId;<br>end;<br><br>大部分情况下还是可以的,只是有时候会出现被运行程序提示'can not opened'的提示,是不是哪个参数设置的有些不当?