调用外部程序并等待其运行结束/实例为调用QQ截图
2010-06-05 12:58
591 查看
var SHExecInfo: SHELLEXECUTEINFO; begin //截图前隐藏主程序窗口 Form1.Hide; //等待截图执行完成 SHExecInfo.cbSize := sizeof(SHELLEXECUTEINFO); SHExecInfo.fMask := SEE_MASK_NOCLOSEPROCESS; SHExecInfo.Wnd := Handle; SHExecInfo.lpVerb := 'open'; SHExecInfo.lpFile := 'Rundll32.exe'; SHExecInfo.lpParameters := 'CameraDll.dll,CameraSubArea'; SHExecInfo.lpDirectory := 'CameraDll.dll'; SHExecInfo.nShow := SW_SHOW; SHExecInfo.hInstApp := Handle; ShellExecuteEx(@SHExecInfo); WaitForSingleObject(SHExecInfo.hProcess, INFINITE); CloseHandle(SHExecInfo.hProcess); //截图完成后显示主程序窗口 Form1.Show; end;
相关文章推荐
- Delphi调用外部程序并等待其运行结束
- 如何让Delphi调用外部程序并等待其运行信息(如结束)
- Delphi 调用外部程序并等待其运行结束
- [delphi]调用外部程序并等待其运行结束
- Delphi 调用外部程序并等待其运行结束
- C++以阻塞的方式调用外部exe程序,等待其运行结束
- Delphi 调用外部程序并等待其运行结束
- delphi 调用外部exe ,并等待调用程序运行结束
- 如何让Delphi调用外部程序并等待其运行结束
- Delphi 调用外部程序并等待其运行结束
- 如何让Delphi调用外部程序并等待其运行信息(如结束)
- Delphi 调用外部程序并等待其运行结束
- Delphi 调用外部程序并等待其运行结束
- 等待外部程序运行结束以后 主程序再继续运行
- 在PB中调用外部程序并判断其运行结束
- VB Shell调用后 等待程序运行结束
- 如何调用一个程序,等待运行结束,并知晓程序运行成功与否:ShellExecuteEx;WaitForSingleObject;GetExitCodeProcess(C代码)
- 在PB中调用外部程序并判断其运行结束
- VB Shell调用后 等待程序运行结束
- MFC调用exe程序,并等待exe程序运行结束(ShellExecuteEx)