如何控制程序中调用的外部进程?HELP ME!高手请进!!

joebao 2001-11-29 11:59:03
我在程序一开始就调用一个外部程序运行,想要等该程序运行完毕后再运行当前的程序,请问如何知道调用的外部程序是否执行完毕。我试着用ENUMWINDOWS,可是程序说参数不够,可我已经给参数了。
...全文
132 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
adventurezl 2001-12-21
  • 打赏
  • 举报
回复
最好的办法: 利用
ShellExcecute()

HINSTANCE ShellExecute(

HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
awave 2001-11-30
  • 打赏
  • 举报
回复
用createprocess,再用waitforsingleobject等待外部程序运行完毕

249

社区成员

发帖
与我相关
我的任务
社区描述
其他产品/厂家
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧