Start two processes and connect them with a pipe in Delphi

前端 未结 4 2163
一整个雨季
一整个雨季 2021-02-09 16:09

I need to launch two external programs in my program and connect the STDOUT of the first one to the STDIN of the second program. How can you achieve this in Delphi (RAD Studio 2

4条回答
  •  渐次进展
    2021-02-09 17:02

    That approach should work. Before worrying about calling it from Delphi, get the command line worked out by running in a command prompt window (DOS window).
    Then just call that command from Delphi with WinExec or ShellExecute. There are options for calling and waiting, or just "fire and forget".

提交回复
热议问题