Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Capturing stdout from an external program

Capturing stdout from an external program

Scheduled Pinned Locked Moved C / C++ / MFC
winformsquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    piul
    wrote on last edited by
    #1

    I have two different applications appDad and appKid. appDad is a Windows Forms Application and it calls appKid.exe. appKid does a series of prinf´s that I want to display in a text box in appDad. Some suggest that I use FILE * output = _popen ("ls", "r") or freopen ("/dev/tty", "w", stdout) but I´m not quite sure what I´m doing. Am I being lazy for asking instead of researching a bit more? I hope not...

    D 1 Reply Last reply
    0
    • P piul

      I have two different applications appDad and appKid. appDad is a Windows Forms Application and it calls appKid.exe. appKid does a series of prinf´s that I want to display in a text box in appDad. Some suggest that I use FILE * output = _popen ("ls", "r") or freopen ("/dev/tty", "w", stdout) but I´m not quite sure what I´m doing. Am I being lazy for asking instead of researching a bit more? I hope not...

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      See here and here.

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Man who follows car will be exhausted." - Confucius

      P 1 Reply Last reply
      0
      • D David Crow

        See here and here.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        P Offline
        P Offline
        piul
        wrote on last edited by
        #3

        Ok, thanks a lot. But... is there a simpler way to do it in .NET?

        D 1 Reply Last reply
        0
        • P piul

          Ok, thanks a lot. But... is there a simpler way to do it in .NET?

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          piul wrote:

          But... is there a simpler way to do it in .NET?

          .NET is a framework, not a language. If you are referring to Managed C++, see here.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups