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. Hot to get ouput of console application executed by my program?

Hot to get ouput of console application executed by my program?

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomtutorial
6 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hello. I'm executing a console application from my program, and is there a way to get information about what was an output of this program? I know that porgram wich I'm executing using fprintf(stdout,...) to make an output to console. Or how can I redirect its ouput to the file? To lunch the program I'm using CreateProcess As it's described in A newbie's elementary guide to spawning processes on this site (URL : http://www.codeproject.com/useritems/newbiespawn.asp) Thanks. Alexander

    M J A 3 Replies Last reply
    0
    • L Lost User

      Hello. I'm executing a console application from my program, and is there a way to get information about what was an output of this program? I know that porgram wich I'm executing using fprintf(stdout,...) to make an output to console. Or how can I redirect its ouput to the file? To lunch the program I'm using CreateProcess As it's described in A newbie's elementary guide to spawning processes on this site (URL : http://www.codeproject.com/useritems/newbiespawn.asp) Thanks. Alexander

      M Offline
      M Offline
      Matt Gullett
      wrote on last edited by
      #2

      This article may help you... http://www.codeproject.com/atl/redirect.asp

      L 1 Reply Last reply
      0
      • L Lost User

        Hello. I'm executing a console application from my program, and is there a way to get information about what was an output of this program? I know that porgram wich I'm executing using fprintf(stdout,...) to make an output to console. Or how can I redirect its ouput to the file? To lunch the program I'm using CreateProcess As it's described in A newbie's elementary guide to spawning processes on this site (URL : http://www.codeproject.com/useritems/newbiespawn.asp) Thanks. Alexander

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #3

        Check out this thread. It'll do what you are looking for, but it's in VB. It's not much to port it though. Jeremy L. Falcon "The One Who Said, 'The One Who Said...'" Homepage : Sonork = 100.16311
        01000010011011110110001000100000011101110110000101110011
        00100000011010000110010101110010011001010010111000000000

        L 1 Reply Last reply
        0
        • M Matt Gullett

          This article may help you... http://www.codeproject.com/atl/redirect.asp

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Thanks a lot. It helped :)) Alexander

          1 Reply Last reply
          0
          • J Jeremy Falcon

            Check out this thread. It'll do what you are looking for, but it's in VB. It's not much to port it though. Jeremy L. Falcon "The One Who Said, 'The One Who Said...'" Homepage : Sonork = 100.16311
            01000010011011110110001000100000011101110110000101110011
            00100000011010000110010101110010011001010010111000000000

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Thanks for attention! I solved the problem. Alexander

            1 Reply Last reply
            0
            • L Lost User

              Hello. I'm executing a console application from my program, and is there a way to get information about what was an output of this program? I know that porgram wich I'm executing using fprintf(stdout,...) to make an output to console. Or how can I redirect its ouput to the file? To lunch the program I'm using CreateProcess As it's described in A newbie's elementary guide to spawning processes on this site (URL : http://www.codeproject.com/useritems/newbiespawn.asp) Thanks. Alexander

              A Offline
              A Offline
              Aoife
              wrote on last edited by
              #6

              Go to this site and download the pipe demo. I got this yesterday and it is great!:) It will get the output of any console command. http://sloat.bradsoft.net/c.php Aoife

              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