Capture DOS output after CreateProcess


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Capture DOS output after CreateProcess

  1. #1
    Join Date
    Oct 2005
    Posts
    3

    Question Capture DOS output after CreateProcess

    I want to run the CreateProcess method in a console session in which I can do some subsequent processing to capture response output coming from a remote computer that is generated after the process I have run using CreateProcess has completed.

    The output that follows my CreateProcess command cannot be piped so somehow after my initial command has been completed I would like to capture the output that I see in the console window when I run the process via a batch file.

    Are there some special parameter settings I should use for calling CreateProcess in this instance? What could I use to capture the response output? At the moment only ReadConsoleOutput looks useful to me.

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    You might want to see if the following example helps:

    http://vb.mvps.org/samples/project.asp?id=console
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Oct 2005
    Posts
    3

    Wink Adaption of Console example

    The Console example that you have pointed me to is a totally independent solution as far as I can see. I am needing to get this functionality of which I have spoken into an existing ActiveX component so am uncertain if this example will help but I will take a look at it and see.

  4. #4
    Join Date
    Oct 2005
    Posts
    3

    Thumbs down No use of ReadConsoleOutput

    I believe the method I should be using is ReadConsoleOutput. The Karl Peterson example you have pointed me to makes no use of this API at all.

  5. #5
    Join Date
    Dec 2003
    Posts
    2,750
    Are you sure you don't need to use ReadConsoleOutputCharacter instead?

    http://searchvb.techtarget.com/tip/1...my=%2Fpr%2F4f0
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. Capturing the Console Output in VB .Net
    By satya_gsn in forum .NET
    Replies: 2
    Last Post: 06-29-2005, 03:14 PM
  2. Save Screen Capture output to a file
    By Ranger in forum VB Classic
    Replies: 2
    Last Post: 12-11-2000, 06:00 AM
  3. Save Screen Capture output to a file
    By Ranger in forum VB Classic
    Replies: 0
    Last Post: 12-11-2000, 03:00 AM
  4. Scraping Output from a console application
    By Christopher Lutz in forum VB Classic
    Replies: 8
    Last Post: 05-08-2000, 05:06 PM
  5. Scraping Output from a console application
    By Christopher Lutz in forum VB Classic
    Replies: 0
    Last Post: 05-03-2000, 04:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center