Results 1 to 4 of 4

Thread: Console Application Redirection

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    2

    Unhappy Console Application Redirection

    Hi all,

    Here we are, i am trying desperatly to grab in real-time the stdout of a console application. For the moment the furthest i've been is having the infos when the pipe buffer is full (minimum of 1024 bytes ). Obviously it would be so simple when i create the pipe to set the buffer to 0, but we can't ...

    The console application cannot be modified as it is a commercial in-line 3D renderer (Lightwave).

    The main reason i would like this realtime output is in order to wrap it into a GUI. The problem i have is that the buffer reaches 1024 bytes after it renders 3-4 frames...

    Sometimes a frame can take 1 sec, sometimes it can take hours...

    I've been looking everywhere but still no luck...

    Anyone has an idea ???

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    The stdout changes often, so you would need to re-grab it every time you use it so you don't use an old version by mistake.

    I believe there is a way to do this; have you researched in MSDN?
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    2
    Well i continued my investigation, and still no luck. The furtherst i have been was to redirect the stdout of the application inside my own console (really easy) in order maybe to have more access but no ...

    I also tried some API function like ReadOutputCharacters but strangely it doesn't seem to actually do anything...

    I can't beleive that something that "easy" can't be done easily. What i wonder is how can i put on pointer to it and by using copyMemory convert the stream to a string. I haven't found any documentation explaining what was the stdout handle...

    Basically I am stuck

    PS:

    I think that Edgar was better than Sabin

  4. #4
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Stdout is a handle to a stream, just like a file stream or keyboard input stream. Dunno if that helps.

    And I'd take Sabin's blitz over Edgar's tools anyday!
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

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