|
-
May 14th, 2012, 04:26 AM
#2
New Member
Re: Redirecting stdout/stderr/stdin for child processes from within VB
First, thanks to michals for posting this. I realize this is an old post and he may not see the thanks, but I'll still express it.
I invite all comments to my posting. I am attempting to fully understand this before undertaking the sometimes arduous task of adapting it for use in VBA64.
That leads to my first observation - it appears as this was actually written for VBA, but adapted from VB. I say this because the function declaration for "getLastError" seems to serve no purpose in this context. My guess is its use was replaced by the "Err.LastDllError" method here. That and there is also an explicit use of "VBA.Left". Comments?
Most of the posting makes some sense until the "'make sure the process is still running" comment. Unless my understanding of stdin/stdout or what should be accomplished here is wrong (which I don't discount as a possibility), the ReadFile function should be called using hStdOutWritePipe, not hStdOutReadPipe. Also, there appears to be an object presumably defined in a different process as "g_buildProgress". I assume from the name that this is a progress reporting facility used during compilation, which makes little sense if this is VBA. Can anyone help with my confusion, please?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|