I have studied this thread (http://www.masm32.com/board/index.php?topic=1094.msg16357#msg16357) 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 (http://www.masm32.com/board/index.php?topic=9044.msg73814#msg73814), 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"?
I guess the method is to create a pipe (http://win32assembly.online.fr/tut21.html)
Quote from: Vortex on October 11, 2008, 10:32:17 AM
I guess the method is to create a pipe (http://win32assembly.online.fr/tut21.html)
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)
Quote from: Vortex on October 11, 2008, 10:32:17 AM
I guess the method is to create a pipe (http://win32assembly.online.fr/tut21.html)
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