CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    135

    Post Where does the Output Window text come from

    So my VB.Net program executes a command line program as a process. I cannot redirect standard in or out because of the behavior of the third party program. I do need however to capture errors it reports. These errors seem to be displayed within the "Output Window" in the VB.Net IDE.

    I've tried redirecting standard error but its always empty, unless I'm doin it wrong. Where is the Output window text coming from and how can I get to it? What I mean is the command line program I run when it has a error it put it into the Output window. How do I get to that info? I CAN redirect strerror if needed, but not in or out. Any ideas?

    Allan.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Where does the Output Window text come from

    The 3rd party app may be posting the errors as debug output (which the .net ide output window captures). To verify this, download the [free] DebugView program from www.sysinternals.com and start up the 3rd party app directly from the command line (or from the .net ide with your program running under "Release" mode - careful here as I don't know if VB has such a thing).

    If the 3rd party app is indeed spewing error output to the debugger, it hopefully is also returning a meaningful application exit code that you can trap in VB. I am not a vb programmer but in Win32 you can use GetExitCodeProcess to retrieve it. There might be something similar for vb (or just use the Win32 function).

    Arjay

  3. #3
    Join Date
    Jul 2003
    Posts
    135

    Re: Where does the Output Window text come from

    I used that app and it didnt catch anything. The wierd part is regular output from the program within the VB.Net IDE does not go to the output window, only when there is a error it puts the error in the output window.

    Heres the wierd part though. It outputs ALL output from the program to the output window but only if I redirect standarderror. standardoutput is not redirected. If I turn off redirect on standarderror then nothing comes up in the output window.

    This is related to another post I have called "Need to get stdoutput without redirect" or something like that. I'm running out of ideas though.

    Allan.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured