Is it possible to use a third-party console application in Delphi as part of a non-console program?

That is, I have the usual program - ping.exe. (standard, which is in system32) Can I somehow programmatically connect it to my program and perform any actions with its participation? That is, as if to enter into the console ping.exe 172.0.0.1 and the result will be issued in some Memo?

    2 answers 2

    Discover the wonderful site of delphisources.ru . The link is a bunch of examples of working with programs in the section "DOS and Console", see the first paragraph - "CreateProcess, which returns the console output."

      What you want is the system () function in SI. There is no complete analogue in Delphi. As noted above, functions can help you:

      • WinExec () // Deprecated
      • CreateProcess ()
      • ShellExecute ()