News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Redirect console output to an edit control

Started by jj2007, October 11, 2008, 10:02:13 AM

Previous topic - Next topic

jj2007

I have studied this thread on Console Input-Output (as 3264 users and bots have done :bg) but could not find an answer to a fairly simple question: Can I redirect the complete output of a batch file to an edit control of my choice? In RichMasm, I use a fat batch file for the build process, and I would like to be able to better control the output, i.e. catch error messages etc.; currently it works but I don't find my solution very elegant.
Again, is there any way to tell a batch file "send everything to hEdit"?

Vortex


jj2007

Quote from: Vortex on October 11, 2008, 10:32:17 AM
I guess the method is to create a pipe
Yep, that's exactly the right stuff, thanks a lot, Vortex :U
(some 30 years ago I used pipes in Unix, and it was somewhat simpler - but that's a different story)

jj2007

Quote from: Vortex on October 11, 2008, 10:32:17 AM
I guess the method is to create a pipe

My pipe is working fine now, but I encountered another problem. In the batch file whose output I redirect, there are pause instructions (e.g. when assembly goes wrong). At present, the piped batch process just jumps over the pause as if it had received a keystroke. Is there a way to handle responses to pause properly?

  mov startupinfo.hStdOutput, hWrite
  mov startupinfo.hStdError, hWrite
  ; mrm startupinfo.hStdInput, hRead ; this does not work